Submission #892546

#TimeUsernameProblemLanguageResultExecution timeMemory
892546I_FloPPed21Bank (IZhO14_bank)C++14
Compilation error
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; }

Compilation message (stderr)

bank.cpp:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
bank.cpp:6:1: error: extended character   is not valid in an identifier
    6 |  
      | ^
bank.cpp:15:1: error: extended character   is not valid in an identifier
   15 |  
      | ^
bank.cpp:20:1: error: extended character   is not valid in an identifier
   20 |  
      | ^
bank.cpp:23:1: error: extended character   is not valid in an identifier
   23 |  
      | ^
bank.cpp:24:1: error: extended character   is not valid in an identifier
   24 |  
      | ^
bank.cpp:26:1: error: extended character   is not valid in an identifier
   26 |  
      | ^
bank.cpp:27:1: error: extended character   is not valid in an identifier
   27 |  
      | ^
bank.cpp:38:1: error: extended character   is not valid in an identifier
   38 |  
      | ^
bank.cpp:42:1: error: extended character   is not valid in an identifier
   42 |  
      | ^
bank.cpp:45:1: error: extended character   is not valid in an identifier
   45 |  
      | ^
bank.cpp:51:1: error: extended character   is not valid in an identifier
   51 |  
      | ^
bank.cpp:55:1: error: extended character   is not valid in an identifier
   55 |  
      | ^
bank.cpp:58:1: error: extended character   is not valid in an identifier
   58 |  
      | ^
bank.cpp:59:1: error: extended character   is not valid in an identifier
   59 |  
      | ^
bank.cpp:62:1: error: extended character   is not valid in an identifier
   62 |  
      | ^
bank.cpp:63:1: error: extended character   is not valid in an identifier
   63 |  
      | ^
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:73:1: error: extended character   is not valid in an identifier
   73 |  
      | ^
bank.cpp:74:1: error: extended character   is not valid in an identifier
   74 |  
      | ^
bank.cpp:81:1: error: extended character   is not valid in an identifier
   81 |  
      | ^
bank.cpp:5:1: error: '\U000000a0' does not name a type
    5 |  
      | ^
bank.cpp: In function 'int main()':
bank.cpp:15:1: error: '\U000000a0' was not declared in this scope
   15 |  
      | ^
bank.cpp:16:22: error: 'i' was not declared in this scope
   16 |     for ( int i = 1; i <= n  ; i ++ )
      |                      ^
bank.cpp:20:3: error: expected ';' before 'for'
   20 |  
      |  ^
      |  ;
   21 |     for ( int i = 1; i <= m  ; i ++ )
      |     ~~~
bank.cpp:23:3: error: expected ';' before '\U000000a0'
   23 |  
      |  ^
      |  ;
   24 |  
      | ~ 
bank.cpp:26:3: error: expected ';' before '\U000000a0'
   26 |  
      |  ^
      |  ;
   27 |  
      | ~ 
bank.cpp:81:3: error: expected ';' before 'return'
   81 |  
      |  ^
      |  ;
   82 |     return 0;
      |     ~~~~~~