結果

問題 No.70 睡眠の重要性!
ユーザー hadrorihadrori
提出日時 2015-07-26 17:29:04
言語 C++11
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 467 bytes
コンパイル時間 1,217 ms
コンパイル使用メモリ 143,384 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 23:32:04
合計ジャッジ時間 1,810 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repi(i,0,n)

const int x = 60*24;
int n, lh[32], lm[32], rh[32], rm[32];

int solve() {
    int ans = 0;
    rep(i,n) ans += (rh[i]-lh[i]+24)%24*60+rm[i]-lm[i];
    return ans;
}

void input() {
    scanf("%d", &n);
    rep(i,n) scanf("%d:%d %d:%d", lh+i, lm+i, rh+i, rm+i);
}

int main() {
    input();
    printf("%d\n", solve());
    return 0;
}
0