제출 #476565

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4765652021-09-27 16:00:12AdamGS저장 (Saveit) (IOI10_saveit)C++14
0 / 100
283 ms13344 KiB
#include "grader.h"
#include "encoder.h"
#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
#define rep(a, b) for(ll a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=1e3+7, INF=1e9+7;
vector<ll>V[LIM], P;
ll oc[LIM], odw[LIM], odl[LIM], T[LIM];
void DFS(int x) {
P.pb(x);
odw[x]=1;
sort(all(V[x]));
for(auto i : V[x]) if(!odw[i]) {
oc[i]=x;
DFS(i);
}
}
void encode(int n, int h, int m, int *a, int *b) {
rep(i, m) {
V[a[i]].pb(b[i]);
V[b[i]].pb(a[i]);
}
DFS(0);
rep(i, n-1) rep(j, 10) encode_bit((oc[i+1]&(1<<j))>0);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

encoder.cpp: In function 'void encode(int, int, int, int*, int*)':
encoder.cpp:7:35: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define rep(a, b) for(ll a = 0; a < (b); ++a)
      |                                   ^
encoder.cpp:45:3: note: in expansion of macro 'rep'
   45 |   rep(j, P.size()-1) {
      |   ^~~
encoder.cpp:7:35: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define rep(a, b) for(ll a = 0; a < (b); ++a)
      |                                   ^
encoder.cpp:51:2: note: in expansion of macro 'rep'
   51 |  rep(i, P.size()-1) {
      |  ^~~

decoder.cpp: In function 'void decode(int, int)':
decoder.cpp:7:35: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define rep(a, b) for(ll a = 0; a < (b); ++a)
      |                                   ^
decoder.cpp:30:2: note: in expansion of macro 'rep'
   30 |  rep(i, P.size()-1) {
      |  ^~~
decoder.cpp:7:35: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define rep(a, b) for(ll a = 0; a < (b); ++a)
      |                                   ^
decoder.cpp:36:3: note: in expansion of macro 'rep'
   36 |   rep(j, P.size()-1) {
      |   ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...