Task: | Forgotten measurements |
Sender: | CPLX |
Submission time: | 2024-11-16 15:32:53 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | WRONG ANSWER | 0.00 s | details |
#6 | WRONG ANSWER | 0.03 s | details |
#7 | WRONG ANSWER | 0.03 s | details |
#8 | WRONG ANSWER | 0.03 s | details |
#9 | WRONG ANSWER | 0.03 s | details |
#10 | WRONG ANSWER | 0.03 s | details |
#11 | WRONG ANSWER | 0.03 s | details |
Code
#include <iostream> #include <string> #include <bits/stdc++.h> #include <algorithm> using namespace std; typedef long long ll; #define UPLEFT 0 #define UPRIGHT 1 #define DOWNLEFT 2 #define DOWNRIGHT 3 // ll max(ll a, ll b){ // if(a>b)return a; // return b; // } int main(){ string s; cin >> s; // vector<ll> count(4,0); // for(ll i=0; i<s.size(); i +=2){ // if(s[i]=='U' and s[i+1]=='L')count[UPLEFT] +=1; // else if(s[i]=='L' and s[i+1]=='U')count[UPLEFT] +=1; // else if(s[i]=='U' and s[i+1]=='R')count[UPRIGHT] +=1; // else if(s[i]=='R' and s[i+1]=='U')count[UPRIGHT] +=1; // else if(s[i]=='D' and s[i+1]=='L')count[DOWNLEFT] +=1; // else if(s[i]=='L' and s[i+1]=='D')count[DOWNLEFT] +=1; // else if(s[i]=='D' and s[i+1]=='R')count[DOWNRIGHT] +=1; // else if(s[i]=='R' and s[i+1]=='D')count[DOWNRIGHT] +=1; // } // cout << max(count[UPLEFT], count[DOWNRIGHT]) + max(count[UPRIGHT], count[DOWNLEFT]) << endl; cout << 2 << endl; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
ULDRUR |
correct output |
---|
2 |
user output |
---|
2 |
Test 2
Verdict: ACCEPTED
input |
---|
RULD |
correct output |
---|
2 |
user output |
---|
2 |
Test 3
Verdict: WRONG ANSWER
input |
---|
RULDRURDRURDLULD |
correct output |
---|
7 |
user output |
---|
2 |
Test 4
Verdict: WRONG ANSWER
input |
---|
LDLDRDLULULURURURULDRDLDRDRURD... |
correct output |
---|
19 |
user output |
---|
2 |
Test 5
Verdict: WRONG ANSWER
input |
---|
RURULDLULDRURDLULDRULURULURDLD... |
correct output |
---|
470 |
user output |
---|
2 |
Test 6
Verdict: WRONG ANSWER
input |
---|
DRULDLULDLULDLURDRULDRURDLURDL... |
correct output |
---|
499773 |
user output |
---|
2 |
Test 7
Verdict: WRONG ANSWER
input |
---|
DLURDLULDLULDRULURULURURDLDLDR... |
correct output |
---|
499383 |
user output |
---|
2 |
Test 8
Verdict: WRONG ANSWER
input |
---|
RULDLDLDRULDLDLULURULULDLURDLU... |
correct output |
---|
499622 |
user output |
---|
2 |
Test 9
Verdict: WRONG ANSWER
input |
---|
RDRDRURDLDLURDRULURDLDRULDLULU... |
correct output |
---|
499788 |
user output |
---|
2 |
Test 10
Verdict: WRONG ANSWER
input |
---|
LDLURDRURDRULDLULDLDRURDLULDRU... |
correct output |
---|
499368 |
user output |
---|
2 |
Test 11
Verdict: WRONG ANSWER
input |
---|
DRULULDRDLDLDLURULDRDLURULULDR... |
correct output |
---|
499790 |
user output |
---|
2 |