Submission #465132

# Submission time Handle Problem Language Result Execution time Memory
465132 2021-08-15T08:38:46 Z kilikuma Colouring a rectangle (eJOI19_colouring) C++14
Compilation error
0 ms 0 KB
#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]); 
}

Compilation message

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;
      |        ^~~~~