Submission #1204010

#TimeUsernameProblemLanguageResultExecution timeMemory
1204010Muhammad_AneeqBroken Device (JOI17_broken_device)C++20
Compilation error
0 ms0 KiB
#include "Annalib.h" #include <random> #include <map> #include <vector> using namespace std; vector<int>a1={105,62,68,23,21,113,92,71,93,57,118,88,19,10,26,61,144,127,43,107,102,33,100,37,136,72,142,42,67,121,5,9,45,27,132,138,84,22,123,83,147,95,104,13,126,11,114,97,131,120,81,15,63,55,149,66,122,139,119,82}; vector<int>b1={125,148,110,112,35,50,128,31,4,70,85,29,116,48,6,54,41,30,76,51,60,58,64,99,133,56,141,135,40,103,36,18,65,87,130,91,8,28,25,53,143,12,7,47,129,73,49,2,86,32,3,39,77,20,108,137,79,117,145,75}; void Anna( int N, long long X, int K, int P[] ) { map<int,int>vis; for (int i=0;i<60;i++) { bool w=((1ll<<i)&X); Set(a1[i],w); Set(b1[i],w); vis[a1[i]]=1; vis[b1[i]]=1; } for (int i=0;i<150;i++) { if (!vis[i]) Set(i,0); } }
#include "Brunolib.h" #include <vector> vector<int>a={105,62,68,23,21,113,92,71,93,57,118,88,19,10,26,61,144,127,43,107,102,33,100,37,136,72,142,42,67,121,5,9,45,27,132,138,84,22,123,83,147,95,104,13,126,11,114,97,131,120,81,15,63,55,149,66,122,139,119,82}; vector<int>b={125,148,110,112,35,50,128,31,4,70,85,29,116,48,6,54,41,30,76,51,60,58,64,99,133,56,141,135,40,103,36,18,65,87,130,91,8,28,25,53,143,12,7,47,129,73,49,2,86,32,3,39,77,20,108,137,79,117,145,75}; long long Bruno( int N, int A[] ) { long long ans=0; for (int i=0;i<60;i++) { if (A[a[i]]||A[b[i]]) ans+=(1ll<<i); } return ans; }

Compilation message (stderr)

# 2번째 컴파일 단계

Bruno.cpp:3:1: error: 'vector' does not name a type
    3 | vector<int>a={105,62,68,23,21,113,92,71,93,57,118,88,19,10,26,61,144,127,43,107,102,33,100,37,136,72,142,42,67,121,5,9,45,27,132,138,84,22,123,83,147,95,104,13,126,11,114,97,131,120,81,15,63,55,149,66,122,139,119,82};
      | ^~~~~~
Bruno.cpp:4:1: error: 'vector' does not name a type
    4 | vector<int>b={125,148,110,112,35,50,128,31,4,70,85,29,116,48,6,54,41,30,76,51,60,58,64,99,133,56,141,135,40,103,36,18,65,87,130,91,8,28,25,53,143,12,7,47,129,73,49,2,86,32,3,39,77,20,108,137,79,117,145,75};
      | ^~~~~~
Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:10:13: error: 'a' was not declared in this scope
   10 |       if (A[a[i]]||A[b[i]])
      |             ^
Bruno.cpp:10:22: error: 'b' was not declared in this scope
   10 |       if (A[a[i]]||A[b[i]])
      |                      ^