Submission #49691320
Source Code Expand
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <iostream>
#include <cstdio>
#include <istream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <queue>
#include <iomanip>
#include <numeric>
#include <string>
#include <fstream>
#include <iterator>
#include <functional>
#include <stack>
using namespace std;
#define all(a) (a).begin(),(a).end()
#define forn(i,n) for (int i = 0; i < int(n); ++i)
#define fore(i, l, r) for(int i = (int)l; i < (int)r; ++i
#define forit(it,a) for(auto it = a.begin(); it != a.end(); it++)
#define endl '\n'
#define y1 initialD
#define Okaay ios_base::sync_with_stdio(0)
#define letsGo cin.tie(NULL)
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
//mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng(0);
clock_t startTime;
double getCurrentTime() {
return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}
const int mod = int(1e9) + 7;
const int INF = static_cast<int>(1e9) + 5;
const ll INF_64 = static_cast<ll>(1e18) + 5;
const ld eps = 1e-7;
const ld PI = acos(-1.0);
const char* filename = "improvements.in";
const char* filenameout = "improvements.out";
int add(int x, int y) { return (x + y) % mod; }
int sub(int x, int y) { return (x - y + mod) % mod; }
int mult(int x, int y) { return (x * 1ll * y) % mod; }
ll binpow(ll x, ll exp)
{
if (exp < 0) return 1;
ll ans = 1;
while (exp)
{
if (exp & 1) ans *= x;
x *= x;
exp >>= 1;
}
return ans;
}
int del(int x, int y)
{
return mult(x, binpow(y, mod - 2));
}
void solve()
{
string s;
cin >> s;
if(islower(s[0]))
{
cout << "No\n";
return;
}
for (int i = 1; i < s.size(); ++i)
{
if (isupper(s[i]))
{
cout << "No\n";
return;
}
}
cout << "Yes\n";
}
int naive()
{
return 0;
}
void read()
{
}
//void stress()
//{
// int cnt = 0;
// while (true)
// {
// if (cnt++ % 100 == 0)
// {
// cout << "Ok " << cnt << endl;
// }
// auto nRandom = uniform_int_distribution<int>(1, 5);
// auto mRandom = uniform_int_distribution<int>(1, 10);
// n = nRandom(rng);
// a.assign(n, 0);
// forn(i, n)
// {
// a[i] = mRandom(rng);
// }
// if (naive() != solve())
// {
// auto s = solve();
// auto f = naive();
// cout << "Find\n";
// cout << "n " << n << endl;
// forn(i, n) cout << a[i] << ' ';
// cout << endl << "solve " << s << " naive " << f << endl;
// cin.get();
// solve();
// naive();
// }
// }
//}
int32_t main()
{
Okaay; letsGo;
cout.tie(NULL);
cout << setprecision(20) << fixed;
//#ifndef _DEBUG
//freopen(filename, "r", stdin);
// freopen(filenameout, "w", stdout);
//#endif // !
int T;
//stress();
T = 1;
//cin >> T;
while (T--)
{
read();
solve();
//cout << solve();
}
}
Submission Info
Submission Time
2024-01-27 12:01:21
Task
A - Capitalized?
User
Minder
Language
C++ 20 (gcc 12.2)
Score
100
Code Size
3530 Byte
Status
AC
Exec Time
1 ms
Memory
3600 KB
Compile Error
Main.cpp: In function ‘void solve()’:
Main.cpp:91:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
91 | for (int i = 1; i < s.size(); ++i)
| ~~^~~~~~~~~~
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
100 / 100
Status
Set Name
Test Cases
Sample
01-sample.txt, 02-sample.txt, 03-sample.txt, 04-sample.txt
All
01-sample.txt, 02-sample.txt, 03-sample.txt, 04-sample.txt, 05-hidden.txt, 06-hidden.txt, 07-hidden.txt, 08-hidden.txt, 09-hidden.txt, 10-hidden.txt, 11-hidden.txt, 12-hidden.txt, 13-hidden.txt, 14-hidden.txt, 15-hidden.txt, 16-hidden.txt, 17-hidden.txt, 18-hidden.txt, 19-hidden.txt
Case Name
Status
Exec Time
Memory
01-sample.txt
AC
1 ms
3416 KB
02-sample.txt
AC
1 ms
3320 KB
03-sample.txt
AC
1 ms
3468 KB
04-sample.txt
AC
1 ms
3440 KB
05-hidden.txt
AC
1 ms
3456 KB
06-hidden.txt
AC
1 ms
3372 KB
07-hidden.txt
AC
1 ms
3448 KB
08-hidden.txt
AC
1 ms
3520 KB
09-hidden.txt
AC
1 ms
3404 KB
10-hidden.txt
AC
1 ms
3472 KB
11-hidden.txt
AC
1 ms
3452 KB
12-hidden.txt
AC
1 ms
3472 KB
13-hidden.txt
AC
1 ms
3448 KB
14-hidden.txt
AC
1 ms
3468 KB
15-hidden.txt
AC
1 ms
3420 KB
16-hidden.txt
AC
1 ms
3472 KB
17-hidden.txt
AC
1 ms
3600 KB
18-hidden.txt
AC
1 ms
3380 KB
19-hidden.txt
AC
1 ms
3520 KB