제출 #974425

#제출 시각아이디문제언어결과실행 시간메모리
974425vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms356 KiB
#include<bits/stdc++.h> #include <vector> using namespace std; #define ll long long #define ld long double const ll M = 1e9+7; int main() { ll n,b=0,e=0;cin >> n;vector <vector<ll>> arr(9,vector<ll>()); while(n--){ ll a,b,c;cin >> a >> b >> c; arr[b].push_back(a); }for (ll i = 1; i <= 8; i++) { sort(arr[i].begin(),arr[i].end()); }for (ll i = 1; i <= 4; i++) { ll lt=-1; for(ll tmp : arr[i]){ if(lt!=-1&&abs(lt-tmp)<=10)b+=150; else b+=100;lt=tmp; } }for (ll i = 5; i <= 8; i++) { ll lt=-1; for(ll tmp : arr[i]){ if(lt!=-1&&abs(lt-tmp)<=10)e+=150; else e+=100;lt=tmp; } }cout << b << " " << e; }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:21:13: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   21 |             else b+=100;lt=tmp;
      |             ^~~~
Main.cpp:21:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   21 |             else b+=100;lt=tmp;
      |                         ^~
Main.cpp:28:13: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   28 |             else e+=100;lt=tmp;
      |             ^~~~
Main.cpp:28:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   28 |             else e+=100;lt=tmp;
      |                         ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...