Submission #974284

#TimeUsernameProblemLanguageResultExecution timeMemory
974284vjudge1Ljeto (COCI21_ljeto)C++17
25 / 50
1 ms500 KiB
#include <bits/stdc++.h> #define ll long long #define endl '\n' using namespace std; void solve(){ ll n; cin>>n; vector<pair<ll,pair<ll,ll>>>v(n); ll asum=0; ll bsum=0; for(int i=0;i<n;i++){ cin>>v[i].first>>v[i].second.first>>v[i].second.second; if(v[i].second.first==1 || v[i].second.first==2 || v[i].second.first==3 || v[i].second.first==4){ asum+=100; } else{ bsum+=100; } } vector<vector<ll>>cnt(8); for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(v[i].second.first==v[j].second.first){ cnt[v[i].second.first-1].push_back(v[j].first-v[i].first); } } } for(int i=0;i<8;i++){ for(int j=0;j<cnt[i].size();j++){ if(cnt[i][j]<=10){ if(i==0 || i==1 || i==2 || i==3){ asum+=50; } else{ bsum+=50; } } } } cout<<asum<<' '<<bsum; // ll n,k,b,s; cin>>n>>k>>b>>s; // priority_queue<pair<ll,ll>,vector<pair<ll,ll>>,greater<pair<ll,ll>>>pq; // ll arr[n+1]; // ll perm[n+1]; // for(int i=1;i<=n;i++){ // cin>>perm[i]; // } // for(int i=1;i<=n;i++){ // cin>>arr[i]; // } // pq.push({}) } int main(){ ll tc; tc=1; while(tc--){ solve(); } }

Compilation message (stderr)

Main.cpp: In function 'void solve()':
Main.cpp:30:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |         for(int j=0;j<cnt[i].size();j++){
      |                     ~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...