提出 #76025498


ソースコード 拡げる

#include <bits/stdc++.h>
#define int long long
#define ll long long
#define ull unsigned long long
#define inf 4e18
#define eps 1e-9
#define il inline
#define ls 2*k
#define rs 2*k+1
using namespace std;
const int N=1e5+5,M=250005;
const int mod=998244353;
inline int read(){
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){
        if(ch=='-') f=-1;
        ch=getchar();
    }
    while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
    return x*f;
}
int x;
string s="HelloWorld";
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int tc=1;
	while(tc--){
		cin>>x;
		x--;
		for(int i=0;i<s.size();i++)
			if(i!=x) cout<<s[i];
	}
	return 0;
}
/*
input: 
1
3 4 1
1 2 3
3 3 4 7 
6
output:
14

从大到小按位考虑,则如果能在不会让前面取不到的情况下取到,那么一定要操作。 
*/

提出情報

提出日時
問題 A - Hell, World!
ユーザ Limingxuan
言語 C++23 (GCC 15.2.0)
得点 100
コード長 898 Byte
結果 AC
実行時間 1 ms
メモリ 3512 KiB

コンパイルエラー

./Main.cpp: In function 'int main()':
./Main.cpp:32:30: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |                 for(int i=0;i<s.size();i++)
      |                             ~^~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 10
セット名 テストケース
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_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3372 KiB
00_sample_01.txt AC 1 ms 3428 KiB
00_sample_02.txt AC 1 ms 3420 KiB
01_handmade_00.txt AC 1 ms 3332 KiB
01_handmade_01.txt AC 1 ms 3420 KiB
01_handmade_02.txt AC 1 ms 3344 KiB
01_handmade_03.txt AC 1 ms 3512 KiB
01_handmade_04.txt AC 1 ms 3356 KiB
01_handmade_05.txt AC 1 ms 3484 KiB
01_handmade_06.txt AC 1 ms 3432 KiB