Submission #1177018

#TimeUsernameProblemLanguageResultExecution timeMemory
1177018starida1945Ljeto (COCI21_ljeto)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; ll azn[10]; //internet yoxdu eziyyet cekirem pt2 int main(){ ll n,x = 0, y =0,t,a,b; cin>>n; fill(azn +1, azn+ 9, -1) for(ll i = 0; i<n; i++){ cin>>t>>a>>b; if(a < 5) x += 100; else y += 100; if(t - azn[a] <= 10){ if(a < 5) x += 50; else y += 50; } azn[a] = t; } cout<<x<<' '<<y<<endl; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:14:29: error: expected ';' before 'for'
   14 |     fill(azn +1, azn+ 9, -1)
      |                             ^
      |                             ;
   15 |     for(ll i = 0; i<n; i++){
      |     ~~~                      
Main.cpp:15:19: error: 'i' was not declared in this scope
   15 |     for(ll i = 0; i<n; i++){
      |                   ^