Submission #315463

# Submission time Handle Problem Language Result Execution time Memory
315463 2020-10-23T00:14:28 Z daniel920712 Mouse (info1cup19_mouse) C++14
0 / 100
3 ms 640 KB
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include "grader.h"

using namespace std;
vector < int > how;
vector < int > ans;
bool have[500]={0};
set < int > all;
void solve(int N)
{
    int a,b,c,now,i,j,k;
    for(i=0;i<N;i++) how.push_back(i+1);
    for(i=0;i<N;i++)
    {
        for(j=1;j<=N;j++)
        {
            if(!have[j])
            {
                how[i]=j;
                now=0;
                for(k=1;k<=N;k++)
                {
                    if(!have[j]&&k!=j)
                    {
                        how[i+now+1]=k;
                        now++;
                    }
                }
            }
            a=query(how);
            if(a==N) return;

            swap(how[i],how[(i+1)%N]);
            b=query(how);
            if(b==N) return;
            swap(how[i],how[(i+1)%N]);

            swap(how[i],how[(i+2)%N]);
            c=query(how);
            if(c==N) return;
            swap(how[i],how[(i+2)%N]);
            if(b>a&&c>a)
            {
                have[how[i]]=1;
                break;
            }

        }
    }
}


# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -