제출 #1007924

#제출 시각아이디문제언어결과실행 시간메모리
1007924Faggi앵무새 (IOI11_parrots)C++11
81 / 100
2 ms1344 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int N, int M[]){ int i, j, pot, part,num; for(i=0; i<N; i++) { num=0; pot=1; for(j=0; j<8; j++) { num=i; num=num<<3; num+=j; if((M[i]&pot)>0) send(num); pot*=2; num=0; } }}
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std;void decode(int N, int L, int X[]){ int i,j,a,b,pos,par,num; vector<vector<int>>v(N,vector<int>(8,0)); for(i=0; i<L; i++) { pos=X[i]>>3; par=((pos<<3)^X[i]); v[pos][par]=1; } for(i=0; i<N; i++) { num=0; for(j=7; j>=0; j--) { num=num<<1; num+=v[i][j]; } output(num); }}

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:5:48: warning: unused variable 'part' [-Wunused-variable]
    5 | void encode(int N, int M[]){    int i, j, pot, part,num;    for(i=0; i<N; i++)    {        num=0;        pot=1;        for(j=0; j<8; j++)        {            num=i;            num=num<<3;            num+=j;            if((M[i]&pot)>0)            send(num);            pot*=2;            num=0;        }    }}
      |                                                ^~~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:4:68: warning: unused variable 'a' [-Wunused-variable]
    4 | using namespace std;void decode(int N, int L, int X[]){    int i,j,a,b,pos,par,num;    vector<vector<int>>v(N,vector<int>(8,0));    for(i=0; i<L; i++)    {        pos=X[i]>>3;        par=((pos<<3)^X[i]);        v[pos][par]=1;    }    for(i=0; i<N; i++)    {        num=0;        for(j=7; j>=0; j--)        {            num=num<<1;            num+=v[i][j];        }        output(num);    }}
      |                                                                    ^
decoder.cpp:4:70: warning: unused variable 'b' [-Wunused-variable]
    4 | using namespace std;void decode(int N, int L, int X[]){    int i,j,a,b,pos,par,num;    vector<vector<int>>v(N,vector<int>(8,0));    for(i=0; i<L; i++)    {        pos=X[i]>>3;        par=((pos<<3)^X[i]);        v[pos][par]=1;    }    for(i=0; i<N; i++)    {        num=0;        for(j=7; j>=0; j--)        {            num=num<<1;            num+=v[i][j];        }        output(num);    }}
      |                                                                      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...