Submission #592791

#TimeUsernameProblemLanguageResultExecution timeMemory
592791NotLinuxLjeto (COCI21_ljeto)C++14
50 / 50
1 ms332 KiB
/* character : NotLinux stats : - Skill : 2/10 - Passion : 8/10 - Rating : ~1400/3000 - Biggest Dream : being actually good at cp - Methods : Studying - Extras : No math or coding background - Started at : October of 2021 */ #include <bits/stdc++.h> using namespace std; #define int long long #define mp make_pair #ifdef LOCAL #include "/home/notlinux/debug.h" #else #define debug(x...) void(37) #define showarr(x) void(37) #endif int func(vector < int > arr){ int ans = arr.size() * 100; int sz = arr.size(); for(int i = 1;i<sz;i++){ if(arr[i] - arr[i-1] <= 10){ ans += 50; } } return ans; } int32_t main(){ ios_base::sync_with_stdio(0);cin.tie(nullptr); //int tt;cin>>tt;while(tt--)solve(); int n;cin >> n; vector < vector < int > > player(9); int t1,t2; t1 = t2 = 0; while(n--){ int t,a,b;cin >> t >> a >> b; player[a].push_back(t); } for(int i = 1;i<=8;i++)sort(player[i].begin(),player[i].end()); for(int i = 1;i<=4;i++){ t1 += func(player[i]); t2 += func(player[i+4]); } cout << t1 << " " << t2 << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...