Submission #987001

#TimeUsernameProblemLanguageResultExecution timeMemory
987001activedeltorreClosing Time (IOI23_closing)C++17
Compilation error
0 ms0 KiB
#include "closing.h" using namespace std; #include <vector> int max_score(int N, int X, int Y, long long K,std::vector<int> U, std::vector<int> V, std::vector<int> W) { int n=N,x,y; for(i=0;i<n-1;i++) { x=U[i]; y=Y[i]; if(x!=i || y!=i+1) { cout<<2/0; } } return 0; }

Compilation message (stderr)

closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<n-1;i++)
      |         ^
closing.cpp:13:13: error: 'cout' was not declared in this scope
   13 |             cout<<2/0;
      |             ^~~~
closing.cpp:2:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include "closing.h"
  +++ |+#include <iostream>
    2 | using namespace std;
closing.cpp:13:20: warning: division by zero [-Wdiv-by-zero]
   13 |             cout<<2/0;
      |                   ~^~