Submission #499477

# Submission time Handle Problem Language Result Execution time Memory
499477 2021-12-28T13:40:20 Z adam Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 296 KB
#include <bits/stdc++.h>

using namespace std;
int a[9];
int main()
{
    int t,f,l,p=0,o=0,n;
    cin>>n;
    for (int i=0;i<n;i++)
    {
        cin>>t>>f>>l;
        if (f>=1 && f<=4)
        {
            if (t-a[f]<=10 && a[f]!=0)
            {
                p+=150;
                a[f]=t;
            }
            else
            {
                p+=100;
                a[f]=t;
            }
        }
        else if (f<=8 && f>=5)
        {
            if (t-a[f]<=10 && a[f]!=0)
            {
                o+=150;
                a[f]=t;
            }
            else
            {
                o+=100;
                a[f]=t;
            }
        }
    }
    cout<<p<<' '<<o;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 256 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 204 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 0 ms 204 KB Output is correct