Submission #494214

#TimeUsernameProblemLanguageResultExecution timeMemory
494214asandikciLjeto (COCI21_ljeto)C++17
25 / 50
1 ms332 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...