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

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:30:6: error: expected '}' at end of input
   30 |     }
      |      ^
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();
        double mult = 0.02;
        for(int i = 0; i < 6; i++){
            temp += mult*(vec[i+1] - vec[i]);
            cout << temp << " ";
            mult += 0.1;
        }
 
        for(int i = 0; i < 6; i++)
            cout << "? ";
        cout << endl;
    }