Submission #662923

# Submission time Handle Problem Language Result Execution time Memory
662923 2022-11-26T13:32:48 Z Manoush Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 340 KB
#include <bits/stdc++.h>
#define ll long long int
#define F first
#define S second
#define pb push_back

using namespace std;

int main()
{
    map<ll,ll>m;
    ll r;
    cin>>r;
    ll first=0;
    ll second=0;
    while (r--)
    {
        ll t,a,b;
        cin>>t>>a>>b;
        ll sum=100;
        if (m[a]!=0&&t-m[a]<=10)
        {
            sum+=50;
        }
        m[a]=t;
        if (a<=4)
        {
            first+=sum;
        }
        else
        {
            second+=sum;
        }
    }
    cout<<first<<" "<<second<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 304 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 296 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 304 KB Output is correct
6 Correct 1 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 292 KB Output is correct
13 Correct 0 ms 212 KB Output is correct