結果
問題 | No.146 試験監督(1) |
ユーザー | bal4u |
提出日時 | 2019-04-11 17:09:32 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 14 ms / 1,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 1,260 ms |
コンパイル使用メモリ | 28,668 KB |
実行使用メモリ | 4,376 KB |
最終ジャッジ日時 | 2023-09-26 04:19:35 |
合計ジャッジ時間 | 1,732 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 13 ms
4,376 KB |
testcase_01 | AC | 14 ms
4,376 KB |
testcase_02 | AC | 13 ms
4,376 KB |
コンパイルメッセージ
main.c: 関数 ‘in’ 内: main.c:8:14: 警告: 関数 ‘getchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration] 8 | #define gc() getchar_unlocked() | ^~~~~~~~~~~~~~~~ main.c:14:17: 備考: in expansion of macro ‘gc’ 14 | int c = gc(); | ^~
ソースコード
// yukicoder: No.146 試験監督(1) // 2019.4.11 bal4u #include <stdio.h> #include <stdlib.h> #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif long long in() { int c = gc(); long long n = 0; do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } #define M 1000000007 int main() { int N; long long c, d, ans; N = (int)in(); ans = 0; while (N--) { c = ((in()+1)>>1) % M, d = in() % M; ans += (c * d) % M; } printf("%d\n", (int)(ans % M)); return 0; }