Submission #54335159


Source Code Expand

Copy
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
#include<iomanip>
#include<set>
#include<numeric>
#include<bitset>
#include<queue>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define all(v) v.begin(), v.end()
#define dump(x) cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO" ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FORE(x,a) for(auto& (x) : (a) )
#define ENDL cout<<endl
#define VECCIN(x) for(auto&youso_: (x) )cin>>youso_
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
#include<iomanip>
#include<set>
#include<numeric>
#include<bitset>
#include<queue>

#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define all(v) v.begin(), v.end()
#define dump(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FORE(x,a) for(auto& (x) : (a) )
#define ENDL cout<<endl
#define VECCIN(x) for(auto&youso_: (x) )cin>>youso_
#define VECCOUT(x) for(auto&youso_: (x) )cout<<youso_<<" ";cout<<endl
#define pb(a) push_back(a)
#define mp make_pair
#define mt make_tuple

#define mll map<long long,long long>
#define msl map<string,long long>
#define pll pair<long long, long long>
#define qll queue<long long>
#define pqll priority_queue<long long>
#define vi vector<int>
#define vs vector<string>
#define vll vector<long long>
#define vvll vector<vector<long long>>

using ll = long long;
using ull = unsigned long long;
using namespace std;

const ll MOD = 998244353;
const ll INF = 1e17;

int main() {
    string s;
    cin >> s;
    ll l = 0, u = 0;
    for (char x : s) {
        if (isupper(x))u++;
        else l++;
    }
    if (u > l) {
        for (char& x : s) {
            if (islower(x))x -= 32;
        }
    }
    else {
        for (char& x : s) {
            if (isupper(x))x += 32;
        }
    }
    cout << s;
    return 0;
}

Submission Info

Submission Time
Task B - Uppercase and Lowercase
User Patos1234
Language C++ 20 (gcc 12.2)
Score 200
Code Size 1586 Byte
Status AC
Exec Time 1 ms
Memory 3556 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 13
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3448 KB
00_sample_01.txt AC 1 ms 3440 KB
00_sample_02.txt AC 1 ms 3456 KB
01_random_00.txt AC 1 ms 3556 KB
01_random_01.txt AC 1 ms 3464 KB
01_random_02.txt AC 1 ms 3528 KB
01_random_03.txt AC 1 ms 3484 KB
01_random_04.txt AC 1 ms 3488 KB
01_random_05.txt AC 1 ms 3392 KB
01_random_06.txt AC 1 ms 3512 KB
01_random_07.txt AC 1 ms 3488 KB
01_random_08.txt AC 1 ms 3492 KB
01_random_09.txt AC 1 ms 3460 KB


2025-04-04 (Fri)
03:30:39 +00:00