Submission #648164

#TimeUsernameProblemLanguageResultExecution timeMemory
648164baibhav26062008Intercastellar (JOI22_ho_t1)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int main() { int N;cin>>N; int A[N]; for (int i=0; i<N; i++) { cin >> A[i]; } int Q; cin>>Q; int X[Q]; for (int i=0; i<Q; i++) { cin >> X[i]; } vector<int>L; for (int i = 0; i < N; i++) { int curr = A[i]; int ctr = 0; while (curr % 2 == 0) { curr /= 2; }       if(A[i] %2 == 0) {              for (int i = 0; i < (A[i]/curr); i++)       { L.push_back(curr);                              }         } // (aL.push_back(curr); if (A[i] % 2 != 0) L.push_back(curr); } // (it x : L) cout << x << for (int i = 0; i < Q; i++) { cout << L[X[i]-1] << endl; } }

Compilation message (stderr)

Main.cpp:21:7: error: extended character   is not valid in an identifier
   21 |     }      
      |       ^
Main.cpp:21:10: error: extended character   is not valid in an identifier
   21 |     }      
      |         ^
Main.cpp:21:13: error: extended character   is not valid in an identifier
   21 |     }      
      |           ^
Main.cpp:22:25: error: extended character   is not valid in an identifier
   22 |     if(A[i] %2 == 0) {         
      |                         ^
Main.cpp:22:28: error: extended character   is not valid in an identifier
   22 |     if(A[i] %2 == 0) {         
      |                           ^
Main.cpp:22:31: error: extended character   is not valid in an identifier
   22 |     if(A[i] %2 == 0) {         
      |                             ^
Main.cpp:22:34: error: extended character   is not valid in an identifier
   22 |     if(A[i] %2 == 0) {         
      |                               ^
Main.cpp:23:2: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |  ^
Main.cpp:23:5: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |    ^
Main.cpp:23:8: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |      ^
Main.cpp:23:48: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |                                             ^
Main.cpp:23:51: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |                                               ^
Main.cpp:23:54: error: extended character   is not valid in an identifier
   23 |       for (int i = 0; i < (A[i]/curr); i++)       {
      |                                                 ^
Main.cpp:25:2: error: extended character   is not valid in an identifier
   25 |                               }        
      |  ^
Main.cpp:25:5: error: extended character   is not valid in an identifier
   25 |                               }        
      |    ^
Main.cpp:25:8: error: extended character   is not valid in an identifier
   25 |                               }        
      |      ^
Main.cpp:25:11: error: extended character   is not valid in an identifier
   25 |                               }        
      |        ^
Main.cpp:25:14: error: extended character   is not valid in an identifier
   25 |                               }        
      |          ^
Main.cpp:25:17: error: extended character   is not valid in an identifier
   25 |                               }        
      |            ^
Main.cpp:25:20: error: extended character   is not valid in an identifier
   25 |                               }        
      |              ^
Main.cpp:25:23: error: extended character   is not valid in an identifier
   25 |                               }        
      |                ^
Main.cpp:25:26: error: extended character   is not valid in an identifier
   25 |                               }        
      |                  ^
Main.cpp:25:29: error: extended character   is not valid in an identifier
   25 |                               }        
      |                    ^
Main.cpp:25:32: error: extended character   is not valid in an identifier
   25 |                               }        
      |                      ^
Main.cpp:25:35: error: extended character   is not valid in an identifier
   25 |                               }        
      |                        ^
Main.cpp:25:38: error: extended character   is not valid in an identifier
   25 |                               }        
      |                          ^
Main.cpp:25:41: error: extended character   is not valid in an identifier
   25 |                               }        
      |                            ^
Main.cpp:25:44: error: extended character   is not valid in an identifier
   25 |                               }        
      |                              ^
Main.cpp:25:48: error: extended character   is not valid in an identifier
   25 |                               }        
      |                                 ^
Main.cpp:25:51: error: extended character   is not valid in an identifier
   25 |                               }        
      |                                   ^
Main.cpp:25:54: error: extended character   is not valid in an identifier
   25 |                               }        
      |                                     ^
Main.cpp:25:57: error: extended character   is not valid in an identifier
   25 |                               }        
      |                                       ^
Main.cpp: In function 'int main()':
Main.cpp:21:7: error: '\U000000a0' was not declared in this scope
   21 |     }      
      |       ^
Main.cpp:18:9: warning: unused variable 'ctr' [-Wunused-variable]
   18 |     int ctr = 0;
      |         ^~~
Main.cpp:29:3: error: expected '}' at end of input
   29 |   }
      |   ^
Main.cpp:3:12: note: to match this '{'
    3 | int main() {
      |            ^