Submission #111979

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1119792019-05-17 03:25:23AMO5Memory 2 (JOI16_memory2)C++98
Compilation error
0 ms0 KiB
#include "Memory2_lib.h"
void Solve(int T, int N){
int p[1011],visit[1011];
int adj[55][55];
vector < pair < int, pii> > pos[55];
if(T==1)
{
int n = N*2;
memset(p,0,sizeof(p));
for(int i = 1; i <= n; i++)
{
for(int j = i+1; j <= n; j++)
{
int x = Flip(i,j);
adj[i-1][j-1] = x;
adj[j-1][i-1] = x;
}
}
for(int i = 0; i < n; i++)
{
for(int j = i+1; j < n; j++)
{
for(int k = j+1; k < n; k++)
{
if(adj[i][j]==adj[i][k]&&adj[i][j]==adj[j][k])
{
int curr = adj[i][j];
pos[curr].pb(mp(i,mp(j,k)));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

memory2.cpp: In function 'void Solve(int, int)':
memory2.cpp:6:2: error: 'vector' was not declared in this scope
  vector < pair < int, pii> > pos[55];
  ^~~~~~
memory2.cpp:6:11: error: 'pair' was not declared in this scope
  vector < pair < int, pii> > pos[55];
           ^~~~
memory2.cpp:6:18: error: expected primary-expression before 'int'
  vector < pair < int, pii> > pos[55];
                  ^~~
memory2.cpp:10:3: error: 'memset' was not declared in this scope
   memset(p,0,sizeof(p));
   ^~~~~~
memory2.cpp:30:7: error: 'pos' was not declared in this scope
       pos[curr].pb(mp(i,mp(j,k)));
       ^~~
memory2.cpp:30:25: error: 'mp' was not declared in this scope
       pos[curr].pb(mp(i,mp(j,k)));
                         ^~
memory2.cpp:30:25: note: suggested alternative: 'p'
       pos[curr].pb(mp(i,mp(j,k)));
                         ^~
                         p
memory2.cpp:30:20: error: 'mp' was not declared in this scope
       pos[curr].pb(mp(i,mp(j,k)));
                    ^~
memory2.cpp:30:20: note: suggested alternative: 'p'
       pos[curr].pb(mp(i,mp(j,k)));
                    ^~
                    p
memory2.cpp:54:7: error: 'pos' was not declared in this scope
    if(pos[i].empty())continue;
       ^~~
memory2.cpp:54:7: note: suggested alternative: 'pos2'
    if(pos[i].empty())continue;
       ^~~
       pos2
memory2.cpp:62:13: error: 'pos' was not declared in this scope
     if(!vis[pos[i][j].fi])
             ^~~
memory2.cpp:62:13: note: suggested alternative: 'pos2'
     if(!vis[pos[i][j].fi])
             ^~~
             pos2
memory2.cpp:72:13: error: 'pos' was not declared in this scope
     if(!vis[pos[i][j].se.fi])
             ^~~
memory2.cpp:72:13: note: suggested alternative: 'pos2'
     if(!vis[pos[i][j].se.fi])
             ^~~
             pos2
memory2.cpp:82:13: error: 'pos' was not declared in this scope
     if(!vis[pos[i][j].se.se])
             ^~~
memory2.cpp:82:13: note: suggested alternative: 'pos2'
     if(!vis[pos[i][j].se.se])
             ^~~
             pos2