# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
26176 |
2017-06-28T08:22:13 Z |
서규호(#1097) |
None (JOI16_snowy) |
C++14 |
|
19 ms |
4172 KB |
#include "Anyalib.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
static int getL;
static int N,bucket = 10;
static int ans[502];
static vector<int> edge[502];
void InitAnya(int n , int A[] , int B[]) {
N = n;
for(int i=0; i<N-1; i++){
edge[A[i]].pb(B[i]);
edge[B[i]].pb(A[i]);
}
}
void Anya(int C[]) {
for(int i=0; i<N-1; i++){
ans[i+1] = ans[i]+C[i];
}
int cnt = 0;
for(int i=bucket; i<N; i+=bucket){
int x = ans[i];
for(int j=1; j<=bucket; j++){
Save(cnt++,x%2);
x /= 2;
}
}
for(int i=0; i<N-1; i++){
Save(cnt++,C[i]);
}
}
#include "Borislib.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
static int N,ans,bucket = 10;
static vector<int> edge[502];
void InitBoris(int n , int A[] , int B[]) {
N = n;
for(int i=0; i<N-1; i++){
edge[A[i]].pb(B[i]);
edge[B[i]].pb(A[i]);
}
}
int Boris(int city) {
int t,tmp;
tmp = ((N-1)/bucket)*bucket;
ans = 0;
if(city >= bucket){
t = (city/bucket)*10-10;
int two = 1;
for(int i=t; i<t+10; i++){
ans += (two*Ask(i));
two *= 2;
}
}
for(int i=(city/bucket)*10; i<city; i++) ans += Ask(tmp+i);
return ans;
}
Compilation message
Anya.cpp:8:12: warning: 'getL' defined but not used [-Wunused-variable]
static int getL;
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
4172 KB |
Output is correct |
2 |
Incorrect |
0 ms |
4172 KB |
Wrong Answer [7] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4172 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
4172 KB |
Output is correct |
2 |
Correct |
16 ms |
4172 KB |
Output is correct |
3 |
Correct |
6 ms |
4172 KB |
Output is correct |
4 |
Correct |
16 ms |
4172 KB |
Output is correct |
5 |
Correct |
12 ms |
4172 KB |
Output is correct |
6 |
Correct |
9 ms |
4172 KB |
Output is correct |
7 |
Correct |
16 ms |
4172 KB |
Output is correct |
8 |
Correct |
12 ms |
4172 KB |
Output is correct |
9 |
Correct |
12 ms |
4172 KB |
Output is correct |
10 |
Correct |
16 ms |
4172 KB |
Output is correct |
11 |
Correct |
12 ms |
4172 KB |
Output is correct |
12 |
Correct |
9 ms |
4172 KB |
Output is correct |
13 |
Correct |
12 ms |
4172 KB |
Output is correct |
14 |
Correct |
12 ms |
4172 KB |
Output is correct |
15 |
Correct |
16 ms |
4172 KB |
Output is correct |
16 |
Correct |
19 ms |
4172 KB |
Output is correct |
17 |
Correct |
16 ms |
4172 KB |
Output is correct |
18 |
Correct |
9 ms |
4172 KB |
Output is correct |
19 |
Correct |
12 ms |
4172 KB |
Output is correct |
20 |
Correct |
9 ms |
4172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
4172 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |