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"iostream"
// #include"vector"
// #include"queue"
// #include"deque"
// #include"set"
// #include"map"
// #include"algorithm"
// #include"cstring"
// #define int long long
using namespace std;
int ch(int a){
if(a>=5){return 1;}
return 0;
}
int ans[5];
int previ[15];
void solve(){
int n;
cin >> n;
int t[n+5],b[n+5],a[n+5];
for(int i=0;i<n;i++){
cin >> t[i] >> a[i] >> b[i];
}
ans[ch(a[0])]+=100;
previ[a[0]]=t[0];
for(int i=1;i<n;i++){
ans[ch(a[i])]+=100;
if((t[i]-previ[a[i]])<=10){
ans[ch(a[i])]+=50;
}
previ[a[i]]=t[i];
}
cout << ans[0] << " " << ans[1];
}
signed main(){
ios::sync_with_stdio(false); cin.tie(0);
// freopen("","r",stdin);freopen("","w",stdout);
int t=1;
// cin >>t;
for(int i=1;i<=t;i++){
// cout << "Case " << i << ":\n";
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |