結果
| 問題 | No.3010 水色コーダーさん | 
| コンテスト | |
| ユーザー |  tnakao0123 | 
| 提出日時 | 2025-01-28 14:02:17 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 32 ms / 2,000 ms | 
| コード長 | 659 bytes | 
| コンパイル時間 | 298 ms | 
| コンパイル使用メモリ | 40,576 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2025-01-28 14:02:21 | 
| 合計ジャッジ時間 | 4,247 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:28:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   28 |   scanf("%d%d", &n, &m);
      |   ~~~~~^~~~~~~~~~~~~~~~
main.cpp:34:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   34 |     scanf("%s%d", s, &ri);
      |     ~~~~~^~~~~~~~~~~~~~~~
            
            ソースコード
/* -*- coding: utf-8 -*-
 *
 * 3010.cc:  No.3010 豌エ濶イ繧ウ繝シ繝繝シ縺輔s - yukicoder
 */
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 200000;
const int MAX_M = 10;
const int K = 4;
const int R = 1200;
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    char s[MAX_M + 4];
    int ri;
    scanf("%s%d", s, &ri);
    int xc = 0;
    for (int j = 0; j < K; j++)
      if (s[j] == 'x') xc++;
    if (ri >= R && xc > 0) cnt++;
  }
  printf("%d\n", cnt);
  return 0;
}
            
            
            
        