Submission #4035653
Source Code Expand
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string; auto rdsp(){return readln.splitter;} void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;} void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);} void main() { int n, m; readV(n, m); struct C { int p, y, i, b; } auto c = new C[](m); foreach (i; 0..m) { int p, y; readV(p, y); c[i] = C(p, y, i, 0); } c.sort!"a.y<b.y"; auto b = new int[](n+1); foreach (ref ci; c) ci.b = ++b[ci.p]; c.sort!"a.i<b.i"; foreach (ci; c) writefln("%06d%06d", ci.p, ci.b); }
Submission Info
Submission Time | |
---|---|
Task | C - ID |
User | tesh |
Language | D (DMD64 v2.070.1) |
Score | 300 |
Code Size | 637 Byte |
Status | AC |
Exec Time | 130 ms |
Memory | 6524 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 124 ms | 4604 KB |
02.txt | AC | 122 ms | 5628 KB |
03.txt | AC | 1 ms | 636 KB |
04.txt | AC | 1 ms | 256 KB |
05.txt | AC | 127 ms | 5756 KB |
06.txt | AC | 124 ms | 5372 KB |
07.txt | AC | 2 ms | 636 KB |
08.txt | AC | 121 ms | 4092 KB |
09.txt | AC | 126 ms | 6524 KB |
10.txt | AC | 130 ms | 4988 KB |
11.txt | AC | 117 ms | 6140 KB |
12.txt | AC | 86 ms | 3324 KB |
13.txt | AC | 128 ms | 6140 KB |
14.txt | AC | 130 ms | 4988 KB |
15.txt | AC | 126 ms | 4732 KB |
16.txt | AC | 129 ms | 5244 KB |
17.txt | AC | 126 ms | 5756 KB |
18.txt | AC | 126 ms | 6268 KB |
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |