Submission #1100489

#TimeUsernameProblemLanguageResultExecution timeMemory
1100489rayan_bdLjeto (COCI21_ljeto)C++17
50 / 50
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,t,a,b;cin>>n; vector<vector<int>> player(10); for(int i=0;i<n;++i){ cin>>t>>a>>b; player[a].push_back(t); } for(int i=1;i<=8;++i){ sort(player[i].begin(),player[i].end()); } int t1=0,t2=0; for(int i=1;i<=4;++i){ if(player[i].size()>0)t1+=100; for(int j=1;j<player[i].size();++j){ t1+=100; if((player[i][j]-player[i][j-1])<=10) t1+=50; } } for(int i=5;i<=8;++i){ if(player[i].size()>0)t2+=100; for(int j=1;j<player[i].size();++j){ t2+=100; if((player[i][j]-player[i][j-1])<=10) t2+=50; } } cout<<t1<<" "<<t2<<'\n'; return 0; }

Compilation message (stderr)

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