Submission #633641

#TimeUsernameProblemLanguageResultExecution timeMemory
633641rc_catuntaLjeto (COCI21_ljeto)C++14
0 / 50
0 ms212 KiB
#include <iostream> #include <vector> using namespace std; int main(){ int x;cin>>x; vector <vector <int> > dis; dis.assign(8+1,vector<int>()); for(int i=0;i<x;i++){ int t,a,b;cin>>t>>a>>b; dis[a-1].push_back(t); } int cont=0,contt=0; for(int i=0;i<4;i++){ for(int j=0;j<dis[i].size();j++){ if(j==0){ cont+=100; }else{ if(dis[i][j-1]>=(dis[i][j]-10)){ cont+=150; }else{ cont+=100; } } } } for(int i=4;i<8;i++){ for(int j=0;j<dis[i].size();j++){ if(j==0){ cont+=100; }else{ if(dis[i][j-1]>=(dis[i][j]-10)){ contt+=150; }else{ contt+=100; } } } } cout<<cont<<" "<<contt; return 0; }

Compilation message (stderr)

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