提出 #64044253


ソースコード 拡げる

Copy
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> A(14, 0);
int a;
for (int i = 0; i < 7; i++) {
cin >> a;
A[a]++;
}
int count1 = false, count2 = false;
for (auto p : A) {
if (p == 2) {
count1++;
}
else if (p >= 3) {
count2++;
}
}
if (count1 >= 1 && count2 >= 1) {
cout << "Yes" << endl;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int> A(14, 0);
  int a;
  for (int i = 0; i < 7; i++) {
    cin >> a;
    A[a]++;
  }
  int count1 = false, count2 = false;
  for (auto p : A) {
    if (p == 2) {
      count1++;
    }
    else if (p >= 3) {
      count2++;
    }
  }
  if (count1 >= 1 && count2 >= 1) {
    cout << "Yes" << endl;
    return 0;
  }
  else if (count2 >= 2) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
}

提出情報

提出日時
問題 B - Full House 3
ユーザ nekoha
言語 C++ 20 (gcc 12.2)
得点 250
コード長 510 Byte
結果 AC
実行時間 1 ms
メモリ 3656 KB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 250 / 250
結果
AC × 4
AC × 34
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 1 ms 3468 KB
hand_02.txt AC 1 ms 3460 KB
hand_03.txt AC 1 ms 3464 KB
hand_04.txt AC 1 ms 3504 KB
sample_01.txt AC 1 ms 3464 KB
sample_02.txt AC 1 ms 3432 KB
sample_03.txt AC 1 ms 3468 KB
sample_04.txt AC 1 ms 3468 KB
test_01.txt AC 1 ms 3568 KB
test_02.txt AC 1 ms 3400 KB
test_03.txt AC 1 ms 3480 KB
test_04.txt AC 1 ms 3572 KB
test_05.txt AC 1 ms 3504 KB
test_06.txt AC 1 ms 3464 KB
test_07.txt AC 1 ms 3444 KB
test_08.txt AC 1 ms 3488 KB
test_09.txt AC 1 ms 3656 KB
test_10.txt AC 1 ms 3564 KB
test_11.txt AC 1 ms 3432 KB
test_12.txt AC 1 ms 3468 KB
test_13.txt AC 1 ms 3464 KB
test_14.txt AC 1 ms 3468 KB
test_15.txt AC 1 ms 3460 KB
test_16.txt AC 1 ms 3500 KB
test_17.txt AC 1 ms 3368 KB
test_18.txt AC 1 ms 3468 KB
test_19.txt AC 1 ms 3464 KB
test_20.txt AC 1 ms 3560 KB
test_21.txt AC 1 ms 3532 KB
test_22.txt AC 1 ms 3460 KB
test_23.txt AC 1 ms 3460 KB
test_24.txt AC 1 ms 3572 KB
test_25.txt AC 1 ms 3464 KB
test_26.txt AC 1 ms 3436 KB


2025-04-10 (木)
04:44:28 +00:00