Submission #1186346
Source Code Expand
#include <cstdio> #include <cmath> #include <cstring> #include <iostream> #include <iomanip> #include <sstream> #include <map> #include <set> #include <array> #include <queue> #include <string> #include <vector> #include <numeric> #include <algorithm> #include <functional> #define MOD 1000000007 #define INF 11234567890 #define in std::cin #define out std::cout #define rep(i,N) for(LL i=0;i<N;++i) typedef long long int LL; typedef std::pair<int, int> P; int H, W, K, T, A[450], B[450], C[450], D[450]; std::string ans[11234]; int main() { in >> H >> W >> K >> T; rep(i, K) { in >> A[i] >> B[i] >> C[i] >> D[i]; } bool areYet_flag = true; int seek = 0; while (areYet_flag == true && seek + 1 <= T) { areYet_flag = false; rep(i, K) { if (A[i] == C[i] && B[i] == D[i]) { ans[seek] += "-"; continue; } areYet_flag = true; if (A[i] < C[i]) { ++A[i]; ans[seek] += "D"; } else if (A[i] > C[i]) { --A[i]; ans[seek] += "U"; } else if (B[i] < D[i]) { ++B[i]; ans[seek] += "R"; } else if (B[i] > D[i]) { --B[i]; ans[seek] += "L"; } } ++seek; } out << seek << std::endl; rep(i, seek - 1) { out << ans[i] << std::endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 日本橋大渋滞 |
User | Bwambocos |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1305 Byte |
Status | WA |
Exec Time | 2 ms |
Memory | 384 KB |
Judge Result
Set Name | test_01 | test_02 | test_03 | test_04 | test_05 | test_06 | test_07 | test_08 | test_09 | test_10 | test_11 | test_12 | test_13 | test_14 | test_15 | test_16 | test_17 | test_18 | test_19 | test_20 | test_21 | test_22 | test_23 | test_24 | test_25 | test_26 | test_27 | test_28 | test_29 | test_30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | 0 / 50000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set Name | Test Cases |
---|---|
test_01 | subtask_01_01.txt |
test_02 | subtask_01_02.txt |
test_03 | subtask_01_03.txt |
test_04 | subtask_01_04.txt |
test_05 | subtask_01_05.txt |
test_06 | subtask_01_06.txt |
test_07 | subtask_01_07.txt |
test_08 | subtask_01_08.txt |
test_09 | subtask_01_09.txt |
test_10 | subtask_01_10.txt |
test_11 | subtask_01_11.txt |
test_12 | subtask_01_12.txt |
test_13 | subtask_01_13.txt |
test_14 | subtask_01_14.txt |
test_15 | subtask_01_15.txt |
test_16 | subtask_01_16.txt |
test_17 | subtask_01_17.txt |
test_18 | subtask_01_18.txt |
test_19 | subtask_01_19.txt |
test_20 | subtask_01_20.txt |
test_21 | subtask_01_21.txt |
test_22 | subtask_01_22.txt |
test_23 | subtask_01_23.txt |
test_24 | subtask_01_24.txt |
test_25 | subtask_01_25.txt |
test_26 | subtask_01_26.txt |
test_27 | subtask_01_27.txt |
test_28 | subtask_01_28.txt |
test_29 | subtask_01_29.txt |
test_30 | subtask_01_30.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask_01_01.txt | WA | 2 ms | 384 KB |
subtask_01_02.txt | WA | 2 ms | 384 KB |
subtask_01_03.txt | WA | 2 ms | 384 KB |
subtask_01_04.txt | WA | 2 ms | 384 KB |
subtask_01_05.txt | WA | 2 ms | 384 KB |
subtask_01_06.txt | WA | 2 ms | 384 KB |
subtask_01_07.txt | WA | 2 ms | 384 KB |
subtask_01_08.txt | WA | 2 ms | 384 KB |
subtask_01_09.txt | WA | 2 ms | 384 KB |
subtask_01_10.txt | WA | 2 ms | 384 KB |
subtask_01_11.txt | WA | 2 ms | 384 KB |
subtask_01_12.txt | WA | 2 ms | 384 KB |
subtask_01_13.txt | WA | 2 ms | 384 KB |
subtask_01_14.txt | WA | 2 ms | 384 KB |
subtask_01_15.txt | WA | 2 ms | 384 KB |
subtask_01_16.txt | WA | 2 ms | 384 KB |
subtask_01_17.txt | WA | 2 ms | 384 KB |
subtask_01_18.txt | WA | 2 ms | 384 KB |
subtask_01_19.txt | WA | 2 ms | 384 KB |
subtask_01_20.txt | WA | 2 ms | 384 KB |
subtask_01_21.txt | WA | 2 ms | 384 KB |
subtask_01_22.txt | WA | 2 ms | 384 KB |
subtask_01_23.txt | WA | 2 ms | 384 KB |
subtask_01_24.txt | WA | 2 ms | 384 KB |
subtask_01_25.txt | WA | 2 ms | 384 KB |
subtask_01_26.txt | WA | 2 ms | 384 KB |
subtask_01_27.txt | WA | 2 ms | 384 KB |
subtask_01_28.txt | WA | 2 ms | 384 KB |
subtask_01_29.txt | WA | 2 ms | 384 KB |
subtask_01_30.txt | WA | 2 ms | 384 KB |