# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
41523 |
2018-02-18T10:35:50 Z |
pica4500 |
cmp (balkan11_cmp) |
C++ |
|
3058 ms |
90768 KB |
#include "cmp.h"
#include <algorithm>
using namespace std;
void remember(int n) {
int grp = n / 64;
grp++;
bit_set(grp);
bit_set(65 + n);
}
int compare(int b) {
int bGrp = b / 64;
bGrp++;
int aGrp = 0;
for (int i = 1; i <= 64; i++) {
if (i > bGrp) return -1;
if (bit_get(i)) {
aGrp = i;
break;
}
}
if (aGrp < bGrp) return 1;
int startG = (aGrp * 64) + 1;
int endG = startG + 63;
int a = -1;
b += 65;
for (int i = startG; i <= endG; i++) {
if (i > b) return -1;
if (bit_get(i)) {
a = i;
break;
}
}
if (a == b) return 0;
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3058 ms |
90768 KB |
ZERO POINTS: more than 20 accesses in the worst case |