Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Viewed less than a minute ago

CBZbsD8A7DJnfLAR

C++ gcc 12.1.0

Created at 1 minute ago

Created by anonymous

Author

anonymous

1 minute ago

Language

C++

Compiler

gcc 12.1.0

Options
Warnings
Don't Use Boost
C++2b(GNU)
-pedantic
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D

Author

anonymous

1 minute ago

›
⌄
⌄
⌄
⌄
⌄
⌄
⌄
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <bits/stdc++.h>
using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long

signed main() {
IOS
int t;
cin >> t;
while (t--)
{
int n,x,count=0;
int a[n];
cout<<"hello";
cin>>n>>x;
for(int i=0;i<n;i++)
{
cin>>a[i];
cout<<"loop";
}
for(int i=0;i<n;i++)
{
cout<<a[i];
}
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
if(a[i]+a[j]<x)
{
count++;
}
}
cout<<count<<endl;
}
}
return 0;
}

›
9
1
2
1 1 1 1

$ g++ prog.cc -Wall -Wextra -std=gnu++2b -pedantic
prog.cc: In function 'int main()':
prog.cc:14:13: warning: ISO C++ forbids variable length array 'a' [-Wvla]
   14 |         int a[n];
      |             ^
helloloop10
Exit Code:
0
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D