CSES - Datatähti 2024 alku - Results
Submission details
Task:Säähavainnot
Sender:anotn
Submission time:2023-11-11 17:06:11 +0200
Language:C++ (C++17)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:28:6: error: expected '}' at end of input
   28 |     }
      |      ^
input/code.cpp:5:11: note: to match this '{'
    5 | int main(){
      |           ^

Code

#include <iostream>
#include <vector>
using namespace std;
 
int main(){
    int n;
    cin >> n;
    for(int loop = 0; loop < n; loop++){
        vector<double> vec;
        double sum = 0;
 
        for(int i = 0; i < 24; i++){
            double d;
            cin >> d;
            vec.push_back(d);
            sum += d;
        }
 
        double temp = vec.back();
        for(int i = 0; i < 5; i++){
            temp += vec[i+1] - vec[i] + (sum >= 0)*(0.08) - (sum < 0)*(-0.08);
            cout << temp << " ";
        }
 
        for(int i = 0; i < 7; i++)
            cout << "? ";
        cout << endl;
    }