結果

問題 No.3010 水色コーダーさん
コンテスト
ユーザー 13d0ccc0-b63b-11f0-9490-db448702d40f
提出日時 2025-11-01 20:12:32
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 309 ms / 2,000 ms
コード長 1,769 bytes
コンパイル時間 9,728 ms
コンパイル使用メモリ 266,240 KB
実行使用メモリ 86,840 KB
最終ジャッジ日時 2025-11-01 20:12:51
合計ジャッジ時間 16,233 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';

let inputs = '';
let inputArray: string[];
let currentIndex = 0;
let outputBuffer = '';

const flush = () => console.log(outputBuffer.trim());
const next = () => inputArray[currentIndex++];
const nextBigInt = (): BigInt => BigInt(next());
const nextBigInts = (length: number): BigInt[] => Array.from({ length: length }, () => nextBigInt());
const nextNum = () => +next();
const nextNums = (length: number): number[] => Array.from({ length: length }, () => nextNum());
const nexts = (length: number): string[] => Array.from({ length: length }, () => next());
function print(out: string | number | bigint): void;
function print<T>(out: Array<T>, separator: string): void;
function print<T>(out: string | number | bigint | Array<T>, separator?: string): void {
    if (Array.isArray(out)) {
        outputBuffer += out.join(separator);
    } else {
        outputBuffer += out;
    }
}
function println(out: string | number | bigint): void;
function println<T>(out: Array<T>, separator: string): void;
function println<T>(out: string | number | bigint | Array<T>, separator?: string) {
    if (Array.isArray(out)) {
        print(out, separator || '');
    } else {
        print(out);
    }
    print('\n');
}

inputs = fs.readFileSync('/dev/stdin', 'utf8');
inputArray = inputs.split(/\s/);
main();
flush();

function main() {
    const [n, m] = nextNums(2);
    let res = 0;
    for (let index = 0; index < n; index++) {
        const s = next();
        const r = nextNum();
        const score = s.slice(0, 4).includes('x');
        if (score && r >= 1200) {
            res++;
        }
    }
    println(res);
}

function minBigInt(x: BigInt, y: BigInt): BigInt {
    if (x > y) {
        return y;
    } else {
        return x;
    }
}
0