답안 #660935

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
660935 2022-11-23T15:01:03 Z Trisanu_Das Go (COCI16_go) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
  int n, need, has, ans = 0, mx = 0, cnt;
  string pok, anss;
  while(n--){
    cin >> pol >> need >> has;
    cnt = 0;
    while(need <= has){
      cnt++; has -= need - 2;
    }
    ans += cnt;
    if(cnt > mx){
      mx = cnt; anss = pok;
    }
  }
  cout << ans << '\n' << anss << '\n';
}

Compilation message

go.cpp: In function 'int main()':
go.cpp:8:12: error: 'pol' was not declared in this scope; did you mean 'pok'?
    8 |     cin >> pol >> need >> has;
      |            ^~~
      |            pok