답안 #789400

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
789400 2023-07-21T10:43:20 Z Joibangla 사이버랜드 (APIO23_cyberland) C++17
컴파일 오류
0 ms 0 KB
#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;
for(i=1 ; i<=n , i++){ 
if(n/i){ 
int ans=i;
}
else{ 
int ans=-1;
}
}
  return 0; 
  }

Compilation message

cyberland.cpp:16:2: error: extended character   is not valid in an identifier
   16 |   return 0;
      |  ^
cyberland.cpp:17:2: error: extended character   is not valid in an identifier
   17 |   }
      |  ^
cyberland.cpp: In function 'int main()':
cyberland.cpp:8:5: error: 'i' was not declared in this scope
    8 | for(i=1 ; i<=n , i++){
      |     ^
cyberland.cpp:8:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 | for(i=1 ; i<=n , i++){
      |              ^
      |              yn
cyberland.cpp:8:21: error: expected ';' before ')' token
    8 | for(i=1 ; i<=n , i++){
      |                     ^
      |                     ;
cyberland.cpp:10:5: warning: unused variable 'ans' [-Wunused-variable]
   10 | int ans=i;
      |     ^~~
cyberland.cpp:13:5: warning: unused variable 'ans' [-Wunused-variable]
   13 | int ans=-1;
      |     ^~~
cyberland.cpp:16:2: error: '\U000000a0return' was not declared in this scope; did you mean 'sigreturn'?
   16 |   return 0;
      |  ^~~~~~~
      |  sigreturn
cyberland.cpp:17:2: error: '\U000000a0' was not declared in this scope
   17 |   }
      |  ^
cyberland.cpp:7:5: warning: unused variable 'ans' [-Wunused-variable]
    7 | int ans;
      |     ^~~