Submission #66927756
Source Code Expand
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define all(c) c.begin(), c.end()
#define ll long long
#define tr(a, it) for (auto it = a.begin(); it != a.end(); it++)
#define present(c, x) (c.find(x) != c.end())
#define cpresent(c, x) (find(all(c), x) != c.end())
#define vi vector<int>
#define vvi vector<vi>
#define vll vector<ll>
#define vvll vector<vll>
#define vpii vector<pair<int, int>>
#define vpll vector<pair<ll, ll>>
#define pll pair<ll, ll>
#define inf 1e9
#define MOD 1000000007
#define MAXN 10000
#define infi 1e18
#define moda 998244353
#define loop(i, s, e) for (ll i = s; i < e; i++)
#define revloop(i, s, e) for (ll i = s; i >= e; i--)
#define newl cout << endl
#define pb push_back
#define f first
#define s second
using namespace std;
using namespace __gnu_pbds;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef DEBUG_H
#define DEBUG_H
#define debug(x) \
cout << #x << " "; \
_print(x); \
cout << '\n';
void _print(int x) { cout << x; }
void _print(char x) { cout << x; }
void _print(double x) { cout << x; }
void _print(string s) { cout << s; }
void _print(uint64_t s) { cout << s; }
void _print(long long x) { cout << x; }
void _print(bool a) { cout << a; }
template <class T, class V>
void _print(pair<T, V> p);
template <class T>
void _print(vector<T> v);
template <class T>
void _print(set<T> v);
template <class T, class V>
void _print(map<T, V> v);
template <class T>
void _print(multiset<T> v);
template <class T>
void _print(priority_queue<T> v);
template <class T>
void _print(deque<T> v);
template <class T, class V>
void _print(pair<T, V> p) {
cout << "{";
_print(p.first);
cout << ",";
_print(p.second);
cout << "}" << endl;
}
template <class T>
void _print(priority_queue<T> pq) {
cout << "[ ";
while (!pq.empty()) {
_print(pq.top());
pq.pop();
cout << " ";
}
cout << "]" << endl;
}
template <class T>
void _print(deque<T> dq) {
cout << "[ ";
while (!dq.empty()) {
_print(dq.front());
dq.pop_front();
cout << " ";
}
cout << "]" << endl;
}
template <class T>
void _print(queue<T> q) {
cout << "[ ";
while (!q.empty()) {
_print(q.front());
q.pop();
cout << " ";
}
cout << "]" << endl;
}
template <class T>
void _print(vector<T> v) {
cout << "[ ";
for (T i : v) {
_print(i);
cout << " ";
}
cout << "]" << endl;
}
template <class T>
void _print(set<T> st) {
cout << "[ ";
for (T i : st) {
_print(i);
cout << " ";
}
cout << "]" << endl;
}
template <class T>
void _print(multiset<T> v) {
cout << "[ ";
for (T i : v) {
_print(i);
cout << " ";
}
cout << "]" << endl;
}
template <class T, class V>
void _print(map<T, V> v) {
cout << "[ ";
for (auto i : v) {
_print(i);
cout << " ";
}
cout << "]" << endl;
}
#endif // DEBUG_H
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ll gcd(ll a, ll b){
if(!(a%b)) return b;
return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
return (a*b)/gcd(a,b);
}
ll MSB(ll n){
ll ans = 0;
while(n){
ans++;
n /= 2;
}
return ans;
}
ll power(ll a, ll b, ll mod) { // to calculate (a^b)%mod
ll p = 1;
while (b > 0) {
if (b & 1)
p = (p * a) % mod;
a = (a * a) % mod;
b = b >> 1;
}
return p;
}
ll inv_mod(ll n, ll mod) {
return power(n, mod - 2, mod);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void solve(int tc) {
string p; cin >> p;
int n; cin >> n;
if(p.size() >= n){
cout << "Yes";
}else{
cout << "No";
}
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int t; t = 1;
// cin >> t;
int tc = 0;
while (t--) {
tc++;
solve(tc);
}
return 0;
}
Submission Info
| Submission Time |
|
| Task |
A - Required Length |
| User |
arikrrr77 |
| Language |
C++ 20 (gcc 12.2) |
| Score |
100 |
| Code Size |
4643 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3600 KiB |
Compile Error
Main.cpp: In function ‘void solve(int)’:
Main.cpp:185:17: warning: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
185 | if(p.size() >= n){
| ~~~~~~~~~^~~~
Main.cpp:182:16: warning: unused parameter ‘tc’ [-Wunused-parameter]
182 | void solve(int tc) {
| ~~~~^~
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
example_00.txt, example_01.txt, example_02.txt |
| All |
example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt |
| Case Name |
Status |
Exec Time |
Memory |
| example_00.txt |
AC |
1 ms |
3592 KiB |
| example_01.txt |
AC |
1 ms |
3456 KiB |
| example_02.txt |
AC |
1 ms |
3460 KiB |
| hand_00.txt |
AC |
1 ms |
3524 KiB |
| hand_01.txt |
AC |
1 ms |
3464 KiB |
| hand_02.txt |
AC |
1 ms |
3592 KiB |
| hand_03.txt |
AC |
1 ms |
3520 KiB |
| hand_04.txt |
AC |
1 ms |
3320 KiB |
| hand_05.txt |
AC |
1 ms |
3448 KiB |
| hand_06.txt |
AC |
1 ms |
3452 KiB |
| random_00.txt |
AC |
1 ms |
3408 KiB |
| random_01.txt |
AC |
1 ms |
3452 KiB |
| random_02.txt |
AC |
1 ms |
3480 KiB |
| random_03.txt |
AC |
1 ms |
3392 KiB |
| random_04.txt |
AC |
1 ms |
3436 KiB |
| random_05.txt |
AC |
1 ms |
3464 KiB |
| random_06.txt |
AC |
1 ms |
3408 KiB |
| random_07.txt |
AC |
1 ms |
3600 KiB |
| random_08.txt |
AC |
1 ms |
3464 KiB |
| random_09.txt |
AC |
1 ms |
3596 KiB |