제출 #1260872

#제출 시각아이디문제언어결과실행 시간메모리
1260872user736482질문 (CEOI14_question_grader)C++20
컴파일 에러
0 ms0 KiB
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define MOD 1000000007
#define INF 1000000019
#define POT (1<<20)
#define INFL 1000000000000000099
ll a,b,c,n,t;
vector<vector<ll>>cs={{1,2,3,4,5,0},{1,4,5,2,3,0},{0,4,2,1,3,5},{0,5,3,1,2,4}};
vector<ll>roz[921];
int main(){
    for(ll i=0;i<920;i++){
        ll x=6*6*6;
        ll o=i;
        for(ll j=0;j<4;j++){
            roz[i].pb(o/x);
            o%=x;
            x/=6;
        }
    }
    cin>>a>>n>>t;
    if(a==1){
        for(ll i=0;i<t;i++){
            cin>>a>>b;
            ll j;
            for(j=0;roz[a][j]==roz[b][j];j++);
            //cout<<j<<" ";
            ll x;
            for(x=0;x<4;x++){
                if((cs[x][0]==roz[a][j] || cs[x][1]==roz[a][j] || cs[x][2]==roz[a][j])&&(cs[x][3]==roz[b][j] || cs[x][4]==roz[b][j] || cs[x][5]==roz[b][j]))break;
            }
            cout<<4*j+x+1<<"\n";
        }
    }
    else{
        for(ll i=0;i<t;i++){
            cin>>a>>b;
            b--;
            ll j=b/4;
            ll x=b%4;
            if(cs[x][0]==roz[a][j] || cs[x][1]==roz[a][j] || cs[x][2]==roz[a][j])cout<<"yes\n";
            else cout<<"no\n";
        }
    }
}
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define MOD 1000000007
#define INF 1000000019
#define POT (1<<20)
#define INFL 1000000000000000099
ll a,b,c,n,t;
vector<vector<ll>>cs={{1,2,3,4,5,0},{1,4,5,2,3,0},{0,4,2,1,3,5},{0,5,3,1,2,4}};
vector<ll>roz[921];
int main(){
    for(ll i=0;i<920;i++){
        ll x=6*6*6;
        ll o=i;
        for(ll j=0;j<4;j++){
            roz[i].pb(o/x);
            o%=x;
            x/=6;
        }
    }
    cin>>a>>n>>t;
    if(a==1){
        for(ll i=0;i<t;i++){
            cin>>a>>b;
            ll j;
            for(j=0;roz[a][j]==roz[b][j];j++);
            //cout<<j<<" ";
            ll x;
            for(x=0;x<4;x++){
                if((cs[x][0]==roz[a][j] || cs[x][1]==roz[a][j] || cs[x][2]==roz[a][j])&&(cs[x][3]==roz[b][j] || cs[x][4]==roz[b][j] || cs[x][5]==roz[b][j]))break;
            }
            cout<<4*j+x+1<<"\n";
        }
    }
    else{
        for(ll i=0;i<t;i++){
            cin>>a>>b;
            b--;
            ll j=b/4;
            ll x=b%4;
            if(cs[x][0]==roz[a][j] || cs[x][1]==roz[a][j] || cs[x][2]==roz[a][j])cout<<"yes\n";
            else cout<<"no\n";
        }
    }
}

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

/usr/bin/ld: /tmp/ccX1NBou.o: in function `main':
grader_encode.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccwKkecx.o:encoder.cpp:(.text.startup+0x270): first defined here
/usr/bin/ld: /tmp/ccX1NBou.o: in function `main':
grader_encode.c:(.text.startup+0x125): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status