Submission #6958
Source Code Expand
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <list> #include <stack> #include <queue> #include <map> #include <string> #include <cctype> #include <cmath> #include <cstring> #include <climits> #include <complex> #include <set> #define DEBUG(x) cout<<"line:"<<__LINE__<<", "<<#x" == "<<(x)<<endl; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define FOR(it,s) for(__typeof(s.begin()) it=s.begin();it!=s.end();it++) #define ALLOF(a) a.begin(),a.end() using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; #define INF (INT_MAX/10-1) #define EPS 1.0e-8 int is_leap(int y) { if (y % 400 == 0) return true; if (y % 100 == 0) return false; if (y % 4 == 0) return true; return false; } int main(int argc, char *argv[]) { int y; scanf("%d", &y); if (is_leap(y)) printf("YES\n"); else printf("NO\n"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - うるう年 |
User | daimatz |
Language | C++11 (GCC 4.8.1) |
Score | 100 |
Code Size | 955 Byte |
Status | AC |
Exec Time | 24 ms |
Memory | 820 KB |
Compile Error
./Main.cpp: In function ‘int main(int, char**)’: ./Main.cpp:38:18: 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 | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_rnd_00.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 01_rnd_11.txt, 01_rnd_12.txt, 01_rnd_13.txt, 01_rnd_14.txt, 01_rnd_15.txt, 01_rnd_16.txt, 01_rnd_17.txt, 01_rnd_18.txt, 01_rnd_19.txt, 02_100_00.txt, 02_100_01.txt, 02_100_02.txt, 02_100_03.txt, 02_100_04.txt, 02_100_05.txt, 02_100_06.txt, 02_100_07.txt, 02_100_08.txt, 02_100_09.txt, 02_100_10.txt, 02_100_11.txt, 02_100_12.txt, 02_100_13.txt, 02_100_14.txt, 02_100_15.txt, 02_100_16.txt, 02_100_17.txt, 02_100_18.txt, 02_100_19.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 22 ms | 792 KB |
00_sample_01.txt | AC | 19 ms | 788 KB |
00_sample_02.txt | AC | 21 ms | 784 KB |
00_sample_03.txt | AC | 20 ms | 788 KB |
01_rnd_00.txt | AC | 22 ms | 796 KB |
01_rnd_01.txt | AC | 22 ms | 788 KB |
01_rnd_02.txt | AC | 20 ms | 788 KB |
01_rnd_03.txt | AC | 22 ms | 796 KB |
01_rnd_04.txt | AC | 20 ms | 792 KB |
01_rnd_05.txt | AC | 20 ms | 784 KB |
01_rnd_06.txt | AC | 21 ms | 788 KB |
01_rnd_07.txt | AC | 20 ms | 788 KB |
01_rnd_08.txt | AC | 22 ms | 816 KB |
01_rnd_09.txt | AC | 20 ms | 788 KB |
01_rnd_10.txt | AC | 21 ms | 768 KB |
01_rnd_11.txt | AC | 20 ms | 788 KB |
01_rnd_12.txt | AC | 20 ms | 784 KB |
01_rnd_13.txt | AC | 20 ms | 732 KB |
01_rnd_14.txt | AC | 20 ms | 764 KB |
01_rnd_15.txt | AC | 20 ms | 808 KB |
01_rnd_16.txt | AC | 21 ms | 792 KB |
01_rnd_17.txt | AC | 21 ms | 788 KB |
01_rnd_18.txt | AC | 21 ms | 788 KB |
01_rnd_19.txt | AC | 21 ms | 792 KB |
02_100_00.txt | AC | 23 ms | 792 KB |
02_100_01.txt | AC | 19 ms | 792 KB |
02_100_02.txt | AC | 21 ms | 760 KB |
02_100_03.txt | AC | 21 ms | 784 KB |
02_100_04.txt | AC | 21 ms | 784 KB |
02_100_05.txt | AC | 21 ms | 788 KB |
02_100_06.txt | AC | 21 ms | 784 KB |
02_100_07.txt | AC | 20 ms | 788 KB |
02_100_08.txt | AC | 21 ms | 784 KB |
02_100_09.txt | AC | 21 ms | 784 KB |
02_100_10.txt | AC | 21 ms | 792 KB |
02_100_11.txt | AC | 21 ms | 752 KB |
02_100_12.txt | AC | 21 ms | 788 KB |
02_100_13.txt | AC | 21 ms | 796 KB |
02_100_14.txt | AC | 21 ms | 792 KB |
02_100_15.txt | AC | 21 ms | 820 KB |
02_100_16.txt | AC | 22 ms | 788 KB |
02_100_17.txt | AC | 22 ms | 788 KB |
02_100_18.txt | AC | 23 ms | 796 KB |
02_100_19.txt | AC | 24 ms | 792 KB |