제출 #884809

#제출 시각아이디문제언어결과실행 시간메모리
884809IsamLjeto (COCI21_ljeto)C++17
0 / 50
0 ms348 KiB
#include<bits/stdc++.h> #ifdef DEBUG #include "debug.h" #else #define debug(...) void(37) #endif using namespace std; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); int N; cin >> N; array<vector<int>, 9> A; for(register int i = 0, a, b, t; i < N; ++i){ cin >> t >> a >> b; if((a <= 4 && b <= 4) || (a > 4 && b > 4)) continue; A[a].emplace_back(t); // ou } for(register int i = 1; i <= 8; ++i){ sort(A[i].begin(), A[i].end()); } long long pinneapple(0), blueberry(0); for(register int i = 1; i <= 4; ++i){ vector<int> tmp = A[i]; pinneapple += 1ll * (int)tmp.size() * 100; for(register int j = 1; j < (int)tmp.size(); ++j){ auto it = upper_bound(tmp.begin(), tmp.end(), tmp[j] - 10); --it; int l = it - tmp.begin() + 1; pinneapple += 1ll * 50 * l; } } for(register int i = 5; i <= 8; ++i){ vector<int> tmp = A[i]; blueberry += 1ll * (int)tmp.size() * 100; for(register int j = 1; j < (int)tmp.size(); ++j){ auto it = upper_bound(tmp.begin(), tmp.end(), tmp[j] - 10); --it; int l = it - tmp.begin() + 1; blueberry += 1ll * 50 * l; } } cout << pinneapple << ' ' << blueberry << '\n'; return 0; }

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

Main.cpp: In function 'int main()':
Main.cpp:16:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                   ^
Main.cpp:16:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                          ^
Main.cpp:16:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                             ^
Main.cpp:16:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                                ^
Main.cpp:21:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   21 |  for(register int i = 1; i <= 8; ++i){
      |                   ^
Main.cpp:25:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   25 |  for(register int i = 1; i <= 4; ++i){
      |                   ^
Main.cpp:28:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   28 |   for(register int j = 1; j < (int)tmp.size(); ++j){
      |                    ^
Main.cpp:35:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   35 |  for(register int i = 5; i <= 8; ++i){
      |                   ^
Main.cpp:38:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   38 |   for(register int j = 1; j < (int)tmp.size(); ++j){
      |                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...