提出 #37491338
ソースコード 拡げる
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define f(i,j,k) for(register int i=j;i<=k;++i)
#define g(i,j,k) for(register int i=j;i>=k;--i)
int n,m,s,l;
int a[202020];
signed main(){
cin>>n;
f(i,1,n)scanf("%lld",&a[i]);
cin>>m;
f(_,1,m){
cin>>l;
if(l==1){
cin>>s>>l;
a[s]=l;
}else{
cin>>s;
cout<<a[s]<<endl;
}
}
return 0;
}
提出情報
コンパイルエラー
./Main.cpp: In function ‘int main()’:
./Main.cpp:10:7: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
10 | f(i,1,n)scanf("%lld",&a[i]);
| ^
./Main.cpp:4:35: note: in definition of macro ‘f’
4 | #define f(i,j,k) for(register int i=j;i<=k;++i)
| ^
./Main.cpp:12:7: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
12 | f(_,1,m){
| ^
./Main.cpp:4:35: note: in definition of macro ‘f’
4 | #define f(i,j,k) for(register int i=j;i<=k;++i)
| ^
./Main.cpp:10:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
10 | f(i,1,n)scanf("%lld",&a[i]);
| ~~~~~^~~~~~~~~~~~~~
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
200 / 200 |
| 結果 |
|
|
| セット名 |
テストケース |
| 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_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, 01_random_10.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 00_sample_00.txt |
AC |
8 ms |
3560 KiB |
| 00_sample_01.txt |
AC |
4 ms |
3604 KiB |
| 00_sample_02.txt |
AC |
2 ms |
3612 KiB |
| 01_random_03.txt |
AC |
118 ms |
3608 KiB |
| 01_random_04.txt |
AC |
139 ms |
4328 KiB |
| 01_random_05.txt |
AC |
138 ms |
4280 KiB |
| 01_random_06.txt |
AC |
35 ms |
4160 KiB |
| 01_random_07.txt |
AC |
81 ms |
4388 KiB |
| 01_random_08.txt |
AC |
194 ms |
4280 KiB |
| 01_random_09.txt |
AC |
138 ms |
4380 KiB |
| 01_random_10.txt |
AC |
138 ms |
4344 KiB |