Submission #789398

#TimeUsernameProblemLanguageResultExecution timeMemory
789398JoibanglaCyberland (APIO23_cyberland)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int main(){ double solve(int n,int m,int h,int k,std::vector<int>x, std::vector<int>y, std::vector<int>c, std::vector<int>arr); int ans=0; for(i=1 ; i<=n , i++){ if(n/i){ int ans+=i; } else{ int ans=-1; } return 0; }

Compilation message (stderr)

cyberland.cpp: In function 'int main()':
cyberland.cpp:9:5: error: 'i' was not declared in this scope
    9 | for(i=1 ; i<=n , i++){
      |     ^
cyberland.cpp:9:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 | for(i=1 ; i<=n , i++){
      |              ^
      |              yn
cyberland.cpp:9:21: error: expected ';' before ')' token
    9 | for(i=1 ; i<=n , i++){
      |                     ^
      |                     ;
cyberland.cpp:11:8: error: expected initializer before '+=' token
   11 | int ans+=i;
      |        ^~
cyberland.cpp:14:5: warning: unused variable 'ans' [-Wunused-variable]
   14 | int ans=-1;
      |     ^~~
cyberland.cpp:7:5: warning: unused variable 'ans' [-Wunused-variable]
    7 | int ans=0;
      |     ^~~
cyberland.cpp:17:1: error: expected '}' at end of input
   17 | }
      | ^
cyberland.cpp:4:11: note: to match this '{'
    4 | int main(){
      |           ^