結果
問題 | No.851 テストケース |
ユーザー |
![]() |
提出日時 | 2019-07-26 22:03:54 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 3,153 ms |
コード長 | 747 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 29,696 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 07:19:20 |
合計ジャッジ時間 | 960 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.c: In function 'in': main.c:9:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration] 9 | #define gc() getchar_unlocked() | ^~~~~~~~~~~~~~~~ main.c:15:27: note: in expansion of macro 'gc' 15 | ll n = 0; int c = gc(); | ^~
ソースコード
// yukicoder: No.851 テストケース// 2019.7.26 bal4u#include <stdio.h>typedef long long ll;#if 1#define gc() getchar_unlocked()#else#define gc() getchar()#endifll 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;if (in() < 0) goto err;for (i = 0; i < 3; i++) {if ((a[i] = in()) < 0) goto err;}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 (b < c) t = b, b = c, c = t;if (c != b) printf("%lld\n", c); else printf("%lld\n", d);return 0;err: puts("\"assert\"");return 0;}