結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-08-17 21:20:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 702 bytes |
| コンパイル時間 | 815 ms |
| コンパイル使用メモリ | 77,480 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 02:26:50 |
| 合計ジャッジ時間 | 1,182 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 1 |
ソースコード
#include <iostream>
#include<utility>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
int n,cnt=0;
cin>>n;
for(int i=0;i<n;i++){
int a,b,c,d;
char e,f;
cin>>a>>e>>b>>c>>f>>d;
if(a>=c){
if(b>=d) cnt+=60*((24-a)+c-1)+60-b+d;
else if(b<d) cnt+=60*((24-a)+c)+d-b;
}
else if(a<c){
if(d>=b) cnt+=60*(c-a)+d-b;
else if(d<b) cnt+=60*(c-a-1)+60-b+d;
}
}
cout<<cnt<<endl;
return 0;
}
sorag