제출 #892551

#제출 시각아이디문제언어결과실행 시간메모리
892551I_FloPPed21은행 (IZhO14_bank)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n, m ; int v[ 22 ], b [ 22 ] ; vector<int> posib [ 22 ] ; vector<int> posixor[ 22 ] ; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ;   for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; }   for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ;     posixor [ 1 ] .push_back(0);     for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; }   if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ;   } }   if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; }   for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ;   for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) {     if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) {     if ( i == n ) { cout << "YES" << '\n'; return 0 ; }   int val = (posib [ i ][ k ] | ( j ));   posixor [ i + 1] .push_back(val);     } } }     } cout << "NO" << '\n';   return 0; }

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

bank.cpp:13:1: error: extended character   is not valid in an identifier
   13 |  
      | ^
bank.cpp:18:1: error: extended character   is not valid in an identifier
   18 |  
      | ^
bank.cpp:21:1: error: extended character   is not valid in an identifier
   21 |  
      | ^
bank.cpp:22:1: error: extended character   is not valid in an identifier
   22 |  
      | ^
bank.cpp:24:1: error: extended character   is not valid in an identifier
   24 |  
      | ^
bank.cpp:25:1: error: extended character   is not valid in an identifier
   25 |  
      | ^
bank.cpp:36:1: error: extended character   is not valid in an identifier
   36 |  
      | ^
bank.cpp:40:1: error: extended character   is not valid in an identifier
   40 |  
      | ^
bank.cpp:43:1: error: extended character   is not valid in an identifier
   43 |  
      | ^
bank.cpp:49:1: error: extended character   is not valid in an identifier
   49 |  
      | ^
bank.cpp:53:1: error: extended character   is not valid in an identifier
   53 |  
      | ^
bank.cpp:56:1: error: extended character   is not valid in an identifier
   56 |  
      | ^
bank.cpp:57:1: error: extended character   is not valid in an identifier
   57 |  
      | ^
bank.cpp:60:1: error: extended character   is not valid in an identifier
   60 |  
      | ^
bank.cpp:61:1: error: extended character   is not valid in an identifier
   61 |  
      | ^
bank.cpp:67:1: error: extended character   is not valid in an identifier
   67 |  
      | ^
bank.cpp:69:1: error: extended character   is not valid in an identifier
   69 |  
      | ^
bank.cpp:71:1: error: extended character   is not valid in an identifier
   71 |  
      | ^
bank.cpp:72:1: error: extended character   is not valid in an identifier
   72 |  
      | ^
bank.cpp:77:1: error: extended character   is not valid in an identifier
   77 |  
      | ^
bank.cpp:78:1: error: extended character   is not valid in an identifier
   78 |  
      | ^
bank.cpp:81:1: error: extended character   is not valid in an identifier
   81 |  
      | ^
bank.cpp: In function 'int main()':
bank.cpp:13:1: error: '\U000000a0' was not declared in this scope
   13 |  
      | ^
bank.cpp:14:22: error: 'i' was not declared in this scope
   14 |     for ( int i = 1; i <= n  ; i ++ )
      |                      ^
bank.cpp:18:3: error: expected ';' before 'for'
   18 |  
      |  ^
      |  ;
   19 |     for ( int i = 1; i <= m  ; i ++ )
      |     ~~~
bank.cpp:21:3: error: expected ';' before '\U000000a0'
   21 |  
      |  ^
      |  ;
   22 |  
      | ~ 
bank.cpp:24:3: error: expected ';' before '\U000000a0'
   24 |  
      |  ^
      |  ;
   25 |  
      | ~ 
bank.cpp:81:3: error: expected ';' before 'return'
   81 |  
      |  ^
      |  ;
   82 |     return 0;
      |     ~~~~~~