답안 #232662

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
232662 2020-05-17T19:07:53 Z crossing0ver 저장 (Saveit) (IOI10_saveit) C++17
0 / 100
10000 ms 5500 KB
#include<bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
using namespace std;
vector<int> adj[1005];
bool vis[1005];
int dis[1005];
void binary (int n) {
	for (int i = 0; i < 10; i++) 
		if ((1 << i) & n) encode_bit(1);
		else encode_bit(0);
}
void encode(int nv, int nh, int ne, int *v1, int *v2){
  for (int i = 0; i < ne; i++) {
  	adj[v1[i]].push_back(v2[i]);
  	adj[v2[i]].push_back(v1[i]);
  }
  for (int  s = 0; s < nh; s++) {
  	queue<int> q;
  	q.push(s);
  	vis[s] = 1;
  	while (!q.empty()) {
		  int v = q.front();
		  
		  for (auto i : adj[v]) {
		  	if (!vis[i]) {
		  		vis[i] = 1;
		  		dis[i] = dis[v] + 1; 
			  }
		  }
	  }
	  for (int i = 0; i < nv; i++)
	  	binary(dis[i]);
	  
	  
	  
	  memset(vis,0,sizeof vis);
	  memset(dis,0,sizeof dis);
	  
  	
  	
  	
  }
  encode_bit(1);
  encode_bit(0);
  return;
}
#include<bits/stdc++.h>
#include "grader.h"
#include "decoder.h"
using namespace std;
void decode(int nv, int nh) {
	for (int s = 0; s < nh; s++) {
		int ans = 0;
		for (int f = 0; f < nv; f++) {
			int ans = 0;
		 for (int x = 0; x < 10; x++)
		 	if (decode_bit())
		 		ans |= (1 << x);
			hops(s,f,ans); 
		 	}
	}
}

Compilation message

decoder.cpp: In function 'void decode(int, int)':
decoder.cpp:10:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    for (int x = 0; x < 10; x++)
    ^~~
decoder.cpp:13:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    hops(s,f,ans); 
    ^~~~
decoder.cpp:7:7: warning: unused variable 'ans' [-Wunused-variable]
   int ans = 0;
       ^~~
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 10028 ms 5500 KB Time limit exceeded
2 Execution timed out 10059 ms 384 KB Time limit exceeded
3 Execution timed out 10014 ms 640 KB Time limit exceeded
4 Execution timed out 10039 ms 384 KB Time limit exceeded
5 Execution timed out 10035 ms 768 KB Time limit exceeded
6 Execution timed out 10037 ms 768 KB Time limit exceeded
7 Execution timed out 10035 ms 1152 KB Time limit exceeded
8 Execution timed out 10029 ms 512 KB Time limit exceeded
9 Execution timed out 10036 ms 640 KB Time limit exceeded
10 Execution timed out 10011 ms 640 KB Time limit exceeded
11 Execution timed out 10018 ms 768 KB Time limit exceeded
12 Execution timed out 10038 ms 512 KB Time limit exceeded
13 Execution timed out 10048 ms 1272 KB Time limit exceeded
14 Execution timed out 10029 ms 640 KB Time limit exceeded
15 Execution timed out 10005 ms 640 KB Time limit exceeded
16 Execution timed out 10052 ms 1144 KB Time limit exceeded
17 Execution timed out 10013 ms 992 KB Time limit exceeded
18 Execution timed out 10034 ms 1400 KB Time limit exceeded
19 Execution timed out 10077 ms 896 KB Time limit exceeded
20 Execution timed out 10019 ms 1660 KB Time limit exceeded
21 Execution timed out 10063 ms 1784 KB Time limit exceeded
22 Execution timed out 10064 ms 1272 KB Time limit exceeded
23 Execution timed out 10037 ms 1912 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 10028 ms 5500 KB Time limit exceeded
2 Execution timed out 10059 ms 384 KB Time limit exceeded
3 Execution timed out 10014 ms 640 KB Time limit exceeded
4 Execution timed out 10039 ms 384 KB Time limit exceeded
5 Execution timed out 10035 ms 768 KB Time limit exceeded
6 Execution timed out 10037 ms 768 KB Time limit exceeded
7 Execution timed out 10035 ms 1152 KB Time limit exceeded
8 Execution timed out 10029 ms 512 KB Time limit exceeded
9 Execution timed out 10036 ms 640 KB Time limit exceeded
10 Execution timed out 10011 ms 640 KB Time limit exceeded
11 Execution timed out 10018 ms 768 KB Time limit exceeded
12 Execution timed out 10038 ms 512 KB Time limit exceeded
13 Execution timed out 10048 ms 1272 KB Time limit exceeded
14 Execution timed out 10029 ms 640 KB Time limit exceeded
15 Execution timed out 10005 ms 640 KB Time limit exceeded
16 Execution timed out 10052 ms 1144 KB Time limit exceeded
17 Execution timed out 10013 ms 992 KB Time limit exceeded
18 Execution timed out 10034 ms 1400 KB Time limit exceeded
19 Execution timed out 10077 ms 896 KB Time limit exceeded
20 Execution timed out 10019 ms 1660 KB Time limit exceeded
21 Execution timed out 10063 ms 1784 KB Time limit exceeded
22 Execution timed out 10064 ms 1272 KB Time limit exceeded
23 Execution timed out 10037 ms 1912 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 10028 ms 5500 KB Time limit exceeded
2 Execution timed out 10059 ms 384 KB Time limit exceeded
3 Execution timed out 10014 ms 640 KB Time limit exceeded
4 Execution timed out 10039 ms 384 KB Time limit exceeded
5 Execution timed out 10035 ms 768 KB Time limit exceeded
6 Execution timed out 10037 ms 768 KB Time limit exceeded
7 Execution timed out 10035 ms 1152 KB Time limit exceeded
8 Execution timed out 10029 ms 512 KB Time limit exceeded
9 Execution timed out 10036 ms 640 KB Time limit exceeded
10 Execution timed out 10011 ms 640 KB Time limit exceeded
11 Execution timed out 10018 ms 768 KB Time limit exceeded
12 Execution timed out 10038 ms 512 KB Time limit exceeded
13 Execution timed out 10048 ms 1272 KB Time limit exceeded
14 Execution timed out 10029 ms 640 KB Time limit exceeded
15 Execution timed out 10005 ms 640 KB Time limit exceeded
16 Execution timed out 10052 ms 1144 KB Time limit exceeded
17 Execution timed out 10013 ms 992 KB Time limit exceeded
18 Execution timed out 10034 ms 1400 KB Time limit exceeded
19 Execution timed out 10077 ms 896 KB Time limit exceeded
20 Execution timed out 10019 ms 1660 KB Time limit exceeded
21 Execution timed out 10063 ms 1784 KB Time limit exceeded
22 Execution timed out 10064 ms 1272 KB Time limit exceeded
23 Execution timed out 10037 ms 1912 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 10028 ms 5500 KB Time limit exceeded
2 Execution timed out 10059 ms 384 KB Time limit exceeded
3 Execution timed out 10014 ms 640 KB Time limit exceeded
4 Execution timed out 10039 ms 384 KB Time limit exceeded
5 Execution timed out 10035 ms 768 KB Time limit exceeded
6 Execution timed out 10037 ms 768 KB Time limit exceeded
7 Execution timed out 10035 ms 1152 KB Time limit exceeded
8 Execution timed out 10029 ms 512 KB Time limit exceeded
9 Execution timed out 10036 ms 640 KB Time limit exceeded
10 Execution timed out 10011 ms 640 KB Time limit exceeded
11 Execution timed out 10018 ms 768 KB Time limit exceeded
12 Execution timed out 10038 ms 512 KB Time limit exceeded
13 Execution timed out 10048 ms 1272 KB Time limit exceeded
14 Execution timed out 10029 ms 640 KB Time limit exceeded
15 Execution timed out 10005 ms 640 KB Time limit exceeded
16 Execution timed out 10052 ms 1144 KB Time limit exceeded
17 Execution timed out 10013 ms 992 KB Time limit exceeded
18 Execution timed out 10034 ms 1400 KB Time limit exceeded
19 Execution timed out 10077 ms 896 KB Time limit exceeded
20 Execution timed out 10019 ms 1660 KB Time limit exceeded
21 Execution timed out 10063 ms 1784 KB Time limit exceeded
22 Execution timed out 10064 ms 1272 KB Time limit exceeded
23 Execution timed out 10037 ms 1912 KB Time limit exceeded