結果

問題 No.851 テストケース
ユーザー bal4ubal4u
提出日時 2019-07-26 22:00:01
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 682 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 28,100 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-15 01:20:30
合計ジャッジ時間 1,950 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 0 ms
4,380 KB
testcase_09 AC 1 ms
4,384 KB
testcase_10 AC 0 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 0 ms
4,380 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 WA -
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 0 ms
4,376 KB
testcase_19 AC 0 ms
4,380 KB
testcase_20 AC 0 ms
4,380 KB
testcase_21 AC 0 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘in’ 内:
main.c:9:14: 警告: 関数 ‘getchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    9 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:15:27: 備考: in expansion of macro ‘gc’
   15 |         ll n = 0; int c = gc();
      |                           ^~

ソースコード

diff #

// yukicoder: No.851 テストケース
// 2019.7.26 bal4u

#include <stdio.h>

typedef long long ll;

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

ll in() {   // 非負整数の入力
	ll n = 0; int c = gc();
	while (1) {
		n = 10 * n + (c & 0xf);
		if ((c = gc()) == ' ') return -1;
		if (c < ' ') break;
	}
	return n;
}

int main()
{
	int i; ll a[3], t, b, c, d;

	in(); for (i = 0; i < 3; i++) {
		if ((a[i] = in()) < 0) { puts("\"assert\""); return 0; }
	}
	b = a[0] + a[1], c = a[0] + a[2], d = a[1] + a[2];
	if (b < c) t = b, b = c, c = t;
	if (c < d) t = c, c = d, d = t;
	if (c != b) printf("%lld\n", c); else printf("%lld\n", d);
	return 0;
}
0