Submission #3534403
Source Code Expand
# # File : C.rb # Author : Kazune Takahashi # Created : 2018-11-4 21:06:08 # Powered by Visual Studio Code # n, m = gets.chomp.split(" ").map{|i| i.to_i} pref = Array.new(n){[]} for i in 0...m pa, y = gets.chomp.split(" ").map{|i| i.to_i} pref[pa - 1] << [y, i] end ans = [] for i in 0...n pref[i].sort! for j in 0...pref[i].size ans << [pref[i][j][1], (i+1).to_s.rjust(6, "0") + (j+1).to_s.rjust(6, "0")] end end ans.sort.each{|cnt, a| puts a }
Submission Info
Submission Time | |
---|---|
Task | C - ID |
User | kazunetakahashi |
Language | Ruby (2.3.3) |
Score | 300 |
Code Size | 496 Byte |
Status | AC |
Exec Time | 1259 ms |
Memory | 31720 KB |
Compile Error
./Main.rb:11: warning: shadowing outer local variable - i
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 | 872 ms | 31720 KB |
02.txt | AC | 1218 ms | 28264 KB |
03.txt | AC | 48 ms | 9340 KB |
04.txt | AC | 7 ms | 1788 KB |
05.txt | AC | 1259 ms | 30056 KB |
06.txt | AC | 836 ms | 30828 KB |
07.txt | AC | 44 ms | 8824 KB |
08.txt | AC | 872 ms | 28656 KB |
09.txt | AC | 868 ms | 31340 KB |
10.txt | AC | 1204 ms | 30480 KB |
11.txt | AC | 941 ms | 28968 KB |
12.txt | AC | 680 ms | 21744 KB |
13.txt | AC | 987 ms | 27752 KB |
14.txt | AC | 885 ms | 31720 KB |
15.txt | AC | 872 ms | 31720 KB |
16.txt | AC | 874 ms | 31720 KB |
17.txt | AC | 872 ms | 31720 KB |
18.txt | AC | 874 ms | 31720 KB |
sample_01.txt | AC | 7 ms | 1788 KB |
sample_02.txt | AC | 7 ms | 1788 KB |
sample_03.txt | AC | 7 ms | 1788 KB |