답안 #476288

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
476288 2021-09-25T22:30:07 Z ShahdMohamed 사육제 (CEOI14_carnival) C++17
20 / 100
92 ms 200 KB
///LW M4 ACC HAZ3L GAMED
///YARAB WALA...I MEAN YARAB ACC
#include<bits/stdc++.h>
#define ll long long
//#define endl "\n"
const ll mod = (ll) 1e9 + 7;
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll n,cnt,took=0,p=1;
    cin>>n;
    vector<ll>ans(n);
    cout<<n<<" ";
    for (ll i=1; i<=n; i++)
        cout<<i<<" ";
    cout<<endl;
    cin>>cnt;
    for (ll i=0; i<n; i++){
        if (ans[i]==0){
            ans[i]=p;
            took++;
            for (ll j=i+1; j<n; j++){
                if (ans[j]==0){
                    cout<<"2 "<<i+1<<" "<<j+1<<endl;
                    ll x;
                    cin>>x;
                    if (x==1){
                            ans[j]=p;
                            took++;
                    }
                }
            }
            p++;
            cnt--;
        }
        if (n-took==cnt){
                for (ll j=0; j<n; j++){
                    if (ans[j]==0){
                        ans[j]=p;
                        p++;
                    }
                }
            break;
        }
    }
    cout<<"0 ";
    for (auto i:ans)
        cout<<i<<" ";
    cout<<endl;

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 200 KB Output is correct
2 Correct 23 ms 200 KB Output is correct
3 Partially correct 48 ms 200 KB Partially correct
4 Partially correct 66 ms 200 KB Partially correct
5 Correct 3 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 15 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 200 KB Output is correct
2 Correct 17 ms 200 KB Output is correct
3 Partially correct 40 ms 200 KB Partially correct
4 Partially correct 46 ms 200 KB Partially correct
5 Correct 3 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 6 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 200 KB Output is correct
2 Correct 7 ms 200 KB Output is correct
3 Partially correct 36 ms 200 KB Partially correct
4 Partially correct 92 ms 200 KB Partially correct
5 Correct 3 ms 200 KB Output is correct
6 Correct 2 ms 200 KB Output is correct
7 Correct 10 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 200 KB Output is correct
2 Correct 6 ms 200 KB Output is correct
3 Partially correct 69 ms 200 KB Partially correct
4 Partially correct 82 ms 200 KB Partially correct
5 Correct 3 ms 200 KB Output is correct
6 Correct 8 ms 200 KB Output is correct
7 Correct 21 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 200 KB Output is correct
2 Correct 10 ms 200 KB Output is correct
3 Partially correct 43 ms 200 KB Partially correct
4 Partially correct 42 ms 200 KB Partially correct
5 Correct 7 ms 200 KB Output is correct
6 Correct 2 ms 200 KB Output is correct
7 Partially correct 78 ms 200 KB Partially correct