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];
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;
for(int i=1;i<n;i++){
ans[ch(a[i])]+=100;
if(a[i-1]==a[i] && (t[i]-t[i-1])<=10){
ans[ch(a[i])]+=50;
}
}
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... |