Submission #220807
Source Code Expand
import std.stdio, std.string, std.conv, std.range, std.array; int[2402] x; void main () { int N = stdin.readln().chomp().to!int(); for(int i = 0; i < N; i++) { auto input = array(stdin.readln().chomp().split("-").map!(to!int)); input[0] = input[0] / 5 * 5; input[1] = (input[1] + 4) / 5 * 5; if(input[1] % 100 == 60) input[1] += 40; for(int j = input[0]; j < input[1]; j++) { x[j] = 1; } } int last = 0; foreach(int i, int v; x) { if(v == 1 && last == 0) { stdout.writef("%04d-", i); }else if(v == 0 && last == 1) { stdout.writef("%04d\n", i); } last = v; } }
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | staka |
Language | D (DMD 2.060) |
Score | 0 |
Code Size | 653 Byte |
Status | CE |
Compile Error
./Main.d(6): Error: undefined identifier 'map', did you mean 'alias cmp'? ./Main.d(6): Error: undefined identifier 'map', did you mean 'alias cmp'?