結果
問題 | No.349 干支の置き物 |
ユーザー |
![]() |
提出日時 | 2016-03-11 22:23:18 |
言語 | C++11 (gcc 4.8.5) |
結果 |
AC
|
実行時間 | 4 ms |
コード長 | 919 Byte |
コンパイル時間 | 554 ms |
使用メモリ | 8,920 KB |
最終ジャッジ日時 | 2019-11-28 07:43:51 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
challlenge1.txt | AC | 3 ms
6,876 KB |
sample1.txt | AC | 3 ms
6,872 KB |
sample2.txt | AC | 3 ms
6,872 KB |
sample3.txt | AC | 4 ms
6,872 KB |
system_test1.txt | AC | 3 ms
6,876 KB |
system_test2.txt | AC | 3 ms
6,872 KB |
system_test3.txt | AC | 3 ms
6,872 KB |
system_test4.txt | AC | 3 ms
6,872 KB |
system_test5.txt | AC | 3 ms
6,872 KB |
system_test6.txt | AC | 3 ms
6,872 KB |
system_test7.txt | AC | 3 ms
6,876 KB |
system_test8.txt | AC | 3 ms
6,872 KB |
system_test9.txt | AC | 3 ms
6,876 KB |
system_test10.txt | AC | 3 ms
6,876 KB |
system_test11.txt | AC | 3 ms
6,872 KB |
system_test12.txt | AC | 3 ms
6,872 KB |
system_test13.txt | AC | 3 ms
6,872 KB |
system_test14.txt | AC | 3 ms
6,876 KB |
system_test15.txt | AC | 3 ms
6,872 KB |
system_test16.txt | AC | 3 ms
8,920 KB |
test1.txt | AC | 3 ms
6,876 KB |
test2.txt | AC | 3 ms
6,872 KB |
test3.txt | AC | 3 ms
8,916 KB |
test4.txt | AC | 2 ms
6,876 KB |
test5.txt | AC | 3 ms
6,876 KB |
test6.txt | AC | 3 ms
6,872 KB |
test7.txt | AC | 3 ms
6,876 KB |
test8.txt | AC | 3 ms
6,872 KB |
test9.txt | AC | 3 ms
6,876 KB |
test10.txt | AC | 4 ms
6,876 KB |
test11.txt | AC | 3 ms
6,872 KB |
test12.txt | AC | 3 ms
6,876 KB |
ソースコード
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> using namespace std; typedef long long ll; int MOD = 1000000007; int main() { int N; cin >> N; vector<int> a(12); for (int i = 0; i < N; i++) { string s; cin >> s; if (s == "ne") a[0]++; if (s == "ushi") a[1]++; if (s == "tora") a[2]++; if (s == "u") a[3]++; if (s == "tatsu") a[4]++; if (s == "mi") a[5]++; if (s == "uma") a[6]++; if (s == "hitsuji") a[7]++; if (s == "saru") a[8]++; if (s == "tori") a[9]++; if (s == "inu") a[10]++; if (s == "i") a[11]++; } bool ok = true; for (int k = 0; k < 12; k++) if (a[k] * 2 - 1 > N) ok = false; cout << (ok ? "YES" : "NO") << endl; }