Submission #313299
Source Code Expand
#include <cstdio>
int a[35];
int main() {
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
int len, n, i, j;
scanf("%d", &n);
for (i = 0; i < 31; i++) if ((1 << i) & n) a[i] = 1;
for (i = 30; i >= 0; i--) if (a[i]) break;
for (j = i; j >= 0; j--) if (a[j] != a[i - j]) break;
if (j >= 0) puts("No"); else puts("Yes");
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 2015 |
| User | kut_ksr1994 |
| Language | C++ (G++ 4.6.4) |
| Score | 2 |
| Code Size | 364 Byte |
| Status | AC |
| Exec Time | 28 ms |
| Memory | 800 KiB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:10:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Judge Result
| Set Name | All | ||
|---|---|---|---|
| Score / Max Score | 2 / 2 | ||
| Status |
|
| Set Name | Test Cases |
|---|---|
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 25 ms | 692 KiB |
| 001.txt | AC | 24 ms | 792 KiB |
| 002.txt | AC | 25 ms | 796 KiB |
| 003.txt | AC | 23 ms | 796 KiB |
| 004.txt | AC | 25 ms | 672 KiB |
| 005.txt | AC | 25 ms | 800 KiB |
| 006.txt | AC | 24 ms | 716 KiB |
| 007.txt | AC | 25 ms | 800 KiB |
| 008.txt | AC | 22 ms | 792 KiB |
| 009.txt | AC | 24 ms | 700 KiB |
| 010.txt | AC | 24 ms | 800 KiB |
| 011.txt | AC | 24 ms | 708 KiB |
| 012.txt | AC | 28 ms | 656 KiB |
| 013.txt | AC | 24 ms | 800 KiB |
| 014.txt | AC | 23 ms | 700 KiB |
| 015.txt | AC | 24 ms | 656 KiB |
| 016.txt | AC | 24 ms | 708 KiB |
| 017.txt | AC | 24 ms | 800 KiB |
| 018.txt | AC | 25 ms | 664 KiB |
| 019.txt | AC | 25 ms | 796 KiB |
| 020.txt | AC | 25 ms | 792 KiB |
| 021.txt | AC | 25 ms | 708 KiB |
| 022.txt | AC | 24 ms | 700 KiB |
| 023.txt | AC | 25 ms | 672 KiB |