CSES - HIIT Open 2024 - Results
Submission details
Task:Forgotten measurements
Sender:CPLX
Submission time:2024-11-16 15:32:53 +0200
Language:C++ (C++17)
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#2ACCEPTED0.00 sdetails
#30.00 sdetails
#40.00 sdetails
#50.00 sdetails
#60.03 sdetails
#70.03 sdetails
#80.03 sdetails
#90.03 sdetails
#100.03 sdetails
#110.03 sdetails

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:

input
RULDRURDRURDLULD

correct output
7

user output
2

Test 4

Verdict:

input
LDLDRDLULULURURURULDRDLDRDRURD...

correct output
19

user output
2

Test 5

Verdict:

input
RURULDLULDRURDLULDRULURULURDLD...

correct output
470

user output
2

Test 6

Verdict:

input
DRULDLULDLULDLURDRULDRURDLURDL...

correct output
499773

user output
2

Test 7

Verdict:

input
DLURDLULDLULDRULURULURURDLDLDR...

correct output
499383

user output
2

Test 8

Verdict:

input
RULDLDLDRULDLDLULURULULDLURDLU...

correct output
499622

user output
2

Test 9

Verdict:

input
RDRDRURDLDLURDRULURDLDRULDLULU...

correct output
499788

user output
2

Test 10

Verdict:

input
LDLURDRURDRULDLULDLDRURDLULDRU...

correct output
499368

user output
2

Test 11

Verdict:

input
DRULULDRDLDLDLURULDRDLURULULDR...

correct output
499790

user output
2