Submission #1027360

#TimeUsernameProblemLanguageResultExecution timeMemory
1027360vjudge1Ljeto (COCI21_ljeto)C++98
25 / 50
1 ms348 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N, T, A, B, Time=0, PointA=0, PointB=0, Current=0, PrevTime=0, CurrentS=0;
    cin>>N;
    for(int i=0; i<N; i++){
        cin>>T>>A>>B;
        if (A==CurrentS && Current==1 && (T-Time)<=10){
            PointA+=50;
        }
        if (A==CurrentS && Current==2 && (T-Time)<=10){
            PointB+=50;
        }
        if (A==1 || A==2 || A==3 || A==4){
            PointA+=100;
            Current=1;
            CurrentS=A;
        }
        else {
            PointB+=100;
            Current=2;
            CurrentS=A;
        }
        Time=T;
    }
    cout<<PointA<<" "<<PointB;
    return 0;
}

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:7:60: warning: unused variable 'PrevTime' [-Wunused-variable]
    7 |     int N, T, A, B, Time=0, PointA=0, PointB=0, Current=0, PrevTime=0, CurrentS=0;
      |                                                            ^~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...