# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
874959 | creeped | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 436 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
ll n;
cin>>n;
ll a[n+1], b[n+1], t[n+1];
ll x[10],y[10];
for(ll i=1;i<=10;i++)
x[i] = y[i] = -10000;
ll ans1=0, ans2=0;
for(ll i=1;i<=n;i++)
{
cin>>t[i]>>a[i]>>b[i];
if(a[i] > 0 and a[i] < 5)
{
ans1 += 100;
if(t[i] - x[a[i]]<= 10)
ans1 += 50;
x[a[i]] = t[i];
}
else
{
ans2 += 100;
if(t[i] - y[a[i]] <= 10)
ans2 += 50;
y[a[i]] = t[i];
}
}
cout<<ans1<<" "<<ans2<<endl;
}
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
ll ttt=1;
//cin>>ttt;
while(ttt--)
{
solve();
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |