제출 #465132

#제출 시각아이디문제언어결과실행 시간메모리
465132kilikumaColouring a rectangle (eJOI19_colouring)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long mini(long a, long b) { if (a<b)return a; else return b; } int main() { int nbLigs, nbCols; cin >> nbLigs >> nbCols; long grille[nbCols+1]; for (int iCol = nbCols-1;iCol >= 0; iCol --) { cin >> grille[iCol]; } for (int iCol = 0; iCol < nbCols; iCol ++) { int a; cin >> a; grille[iCol] = mini(grille[iCol], a); } long somme = 0; for (int iCol = 0; iCol < nbCols; iCol ++) { somme += grille[iCol]; } printf("%ld\n", grille[iCol]); }

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

colouring.cpp:18:45: error: extended character   is not valid in an identifier
   18 |   for (int iCol = 0; iCol < nbCols; iCol ++) {
      |                                             ^
colouring.cpp: In function 'int main()':
colouring.cpp:18:45: error: '\U000000a0' was not declared in this scope
   18 |   for (int iCol = 0; iCol < nbCols; iCol ++) {
      |                                             ^
colouring.cpp:21:26: error: 'iCol' was not declared in this scope
   21 |   printf("%ld\n", grille[iCol]);
      |                          ^~~~
colouring.cpp:17:8: warning: unused variable 'somme' [-Wunused-variable]
   17 |   long somme = 0;
      |        ^~~~~