Submission #349895
Source Code Expand
#define _CRT_SECURE_NO_WARNINGS #include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> #include <functional> #include <stack> #include <array> #include <fstream> #define REP(i,n) for(int (i) = 0;(i) < (n) ; ++(i)) #define REPA(a,i,n) for(int (i) = (a) ; (i) < (n) ; ++(i)) #if defined(_MSC_VER)||__cplusplus > 199711L #define AUTO(r,v) auto r = (v) #else #define AUTO(r,v) typeof(v) r = (v) #endif #define ALL(c) (c).begin() , (c).end() #define EACH(it,c) for(AUTO(it,(c).begin());it != (c).end();++it) #define LL long #define int LL #define INF 99999999 #define DEV 1000000007 #define QUICK_CIN ios::sync_with_stdio(false); cin.tie(0); using namespace std; int timeu[24 * 60+2]; signed main() { QUICK_CIN; ifstream cin("debug.txt"); //ofstream cout("result.txt"); int n; cin >> n; REP(i, n){ string a; cin >> a; int n1 = (a[0] - '0') * 10 + (a[1] - '0'); int n2 = (a[2] - '0') * 10 + (a[3] - '0'); if (n2%10) n2 = n2%10 < 5 ? n2/10*10 : n2/10*10+5; int n3 = (a[5] - '0') * 10 + (a[6] - '0'); int n4 = (a[7] - '0') * 10 + (a[8] - '0'); if (n4%10) n4 = n4%10 < 5 ? n4/10*10+5 : (n4/10 == 5?++n3,0:(n4/10+1)*10); timeu[n1 * 60 + n2] += 1; timeu[n3 * 60 + n4 + 1] += -1; } REP(i, 24*60+1){ timeu[i + 1] += timeu[i]; } REP(i, 24*60+1){ while (!timeu[i] && i < 24*60+1) ++i; int a = i; if (i == 24 * 60+1) break; while (timeu[i+1] && i < 24*60) ++i; cout.width(2); cout.fill('0'); cout << a / 60; cout.width(2); cout.fill('0'); cout << a % 60 << "-"; cout.width(2); cout.fill('0'); cout << i / 60; cout.width(2); cout.fill('0'); cout << i % 60 << endl; } }
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | lovablepleiad |
Language | C++11 (GCC 4.8.1) |
Score | 0 |
Code Size | 1974 Byte |
Status | RE |
Exec Time | 280 ms |
Memory | 944 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, cho_cho_chokudai.txt, chokudai_ga_cho.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt, test_41.txt, test_42.txt, test_43.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | RE | 269 ms | 924 KB |
00_sample_02.txt | RE | 277 ms | 864 KB |
00_sample_03.txt | RE | 275 ms | 880 KB |
cho_cho_chokudai.txt | RE | 269 ms | 876 KB |
chokudai_ga_cho.txt | RE | 267 ms | 872 KB |
test_01.txt | RE | 272 ms | 880 KB |
test_02.txt | RE | 267 ms | 924 KB |
test_03.txt | RE | 275 ms | 928 KB |
test_04.txt | RE | 273 ms | 920 KB |
test_05.txt | RE | 267 ms | 924 KB |
test_06.txt | RE | 269 ms | 868 KB |
test_07.txt | RE | 269 ms | 932 KB |
test_08.txt | RE | 270 ms | 920 KB |
test_09.txt | RE | 278 ms | 924 KB |
test_10.txt | RE | 263 ms | 860 KB |
test_11.txt | RE | 267 ms | 860 KB |
test_12.txt | RE | 269 ms | 928 KB |
test_13.txt | RE | 266 ms | 924 KB |
test_14.txt | RE | 268 ms | 856 KB |
test_15.txt | RE | 265 ms | 880 KB |
test_16.txt | RE | 270 ms | 928 KB |
test_17.txt | RE | 272 ms | 876 KB |
test_18.txt | RE | 267 ms | 884 KB |
test_19.txt | RE | 273 ms | 924 KB |
test_20.txt | RE | 280 ms | 928 KB |
test_21.txt | RE | 269 ms | 924 KB |
test_22.txt | RE | 269 ms | 936 KB |
test_23.txt | RE | 276 ms | 880 KB |
test_24.txt | RE | 272 ms | 856 KB |
test_25.txt | RE | 269 ms | 876 KB |
test_26.txt | RE | 270 ms | 920 KB |
test_27.txt | RE | 273 ms | 912 KB |
test_28.txt | RE | 272 ms | 944 KB |
test_29.txt | RE | 274 ms | 928 KB |
test_30.txt | RE | 273 ms | 928 KB |
test_31.txt | RE | 273 ms | 872 KB |
test_32.txt | RE | 273 ms | 924 KB |
test_33.txt | RE | 270 ms | 880 KB |
test_34.txt | RE | 275 ms | 944 KB |
test_35.txt | RE | 275 ms | 924 KB |
test_36.txt | RE | 274 ms | 928 KB |
test_37.txt | RE | 275 ms | 924 KB |
test_38.txt | RE | 268 ms | 928 KB |
test_39.txt | RE | 277 ms | 928 KB |
test_40.txt | RE | 271 ms | 916 KB |
test_41.txt | RE | 271 ms | 876 KB |
test_42.txt | RE | 269 ms | 928 KB |
test_43.txt | RE | 275 ms | 864 KB |