結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
cumin
|
| 提出日時 | 2020-03-27 17:16:39 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 357µs | |
| コード長 | 528 bytes |
| 記録 | |
| コンパイル時間 | 871 ms |
| コンパイル使用メモリ | 180,912 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-10-11 13:02:58 |
| 合計ジャッジ時間 | 1,736 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll INF=1e18;
const int MOD=1e9+7;
const double pi=acos(-1);
int main(){
int n;
cin >> n;
ll ans=0;
rep(i,n){
int a,b,c,d;
char c1,c2;
cin >> a >> c1 >> b >> c >> c2 >> d;
if(a<c) ans+=c*60+d-a*60-b;
else if(a==c){
if(b<=d)ans+=d-b;
else ans+=24*60-b-d;
}
else{
ans+=60*24-a*60-b+c*60+d;
}
}
cout << ans << endl;
}
cumin