提出 #66926709


ソースコード 拡げる

#include <bits/stdc++.h>
#include <atcoder/all>

#define LF putchar('\n')

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 998244353LL; //1000000007LL;
static const LLONG INF_NUM = 1e18;
static const int CH_KIND = 'z' - 'a' + 1;
template<class _T> static void get(_T& a) {
	std::cin >> a;
}
template<class _T> static void get(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void get(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}
template <class _T> static _T tp_abs(_T a) {
	if (a < (_T)0) {
		a *= (_T)-1;
	}
	return a;
}
template <class _T> static _T tp_pow(int x, int exp)
{
	_T ans = 1;
	_T base = x;
	while (exp > 0) {
		if (exp & 1) {
			ans = (ans * base);
		}
		base = (base * base);
		exp >>= 1;
	}
	return ans;
}

static void task();

int main()
{
	task();
	fflush(stdout);
	return 0;
}

static void task()
{
	std::string p;
	get(p);
	int l;
	get(l);

	printf("%s\n", (p.length() >= l ? "Yes" : "No"));
}

提出情報

提出日時
問題 A - Required Length
ユーザ takumat
言語 C++ 20 (gcc 12.2)
得点 100
コード長 1035 Byte
結果 AC
実行時間 1 ms
メモリ 3688 KiB

コンパイルエラー

Main.cpp: In function ‘void task()’:
Main.cpp:56:36: warning: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   56 |         printf("%s\n", (p.length() >= l ? "Yes" : "No"));
      |                         ~~~~~~~~~~~^~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 20
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
example_00.txt AC 1 ms 3476 KiB
example_01.txt AC 1 ms 3540 KiB
example_02.txt AC 1 ms 3512 KiB
hand_00.txt AC 1 ms 3504 KiB
hand_01.txt AC 1 ms 3536 KiB
hand_02.txt AC 1 ms 3512 KiB
hand_03.txt AC 1 ms 3544 KiB
hand_04.txt AC 1 ms 3512 KiB
hand_05.txt AC 1 ms 3408 KiB
hand_06.txt AC 1 ms 3608 KiB
random_00.txt AC 1 ms 3564 KiB
random_01.txt AC 1 ms 3508 KiB
random_02.txt AC 1 ms 3540 KiB
random_03.txt AC 1 ms 3412 KiB
random_04.txt AC 1 ms 3496 KiB
random_05.txt AC 1 ms 3508 KiB
random_06.txt AC 1 ms 3568 KiB
random_07.txt AC 1 ms 3564 KiB
random_08.txt AC 1 ms 3688 KiB
random_09.txt AC 1 ms 3560 KiB