QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#184826 | #6443. Windblume Festival | KAZE_mae# | Compile Error | / | / | C++17 | 1.7kb | 2023-09-21 13:17:45 | 2023-09-21 13:17:46 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define endl '\n'
#define mod 998244353
#define ffor(n) for(int i = 0;i < n;++i)
const int N = 2000006;
using namespace std;
void build_log();
int mv_x[4] = {1,0,-1,0};
int mv_y[4] = {0,1,0,-1};
int year[2][15] = {{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};//1æ¯é°å¹´,0æ¯éé°å¹´
int t;
int m_log2[500005]; // log2(x) + 1
int k;
int n,m;
int h;
vector<int>v;
signed main()
{
//ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
cin>>t;
while(t--)
{
cin>>n;
int a;
int sum = 0;
int mmin = 10000000000;
int mmax = -10000000000;
if(n == 1)
{
cin >> a;
cout<<a<<endl;
continue;
}
ffor(n)
{
cin>>a;
if(a < 0)
{
sum -= a;
}
else
{
sum += a;
}
mmin = min(mmin,a);
mmax = max(mmax,a);
}
if(mmin > 0)
{
sum -= 2 * mmin;
}
if(mmax < 0)
{
sum += 2 * mmax;
}
cout<<sum<<endl;
}
return 0;
}
void build_log()
{
for(int i = 1;i <= n;i++)
{
m_log2[i] = m_log2[i-1] + ((1 << m_log2[i-1]) == i);
}
}
Details
answer.code:30:1: error: extended character is not valid in an identifier 30 | //ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); | ^ answer.code:30:3: error: extended character is not valid in an identifier 30 | //ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); | ^ answer.code:31:1: error: extended character is not valid in an identifier 31 | cin>>t; | ^ answer.code:31:3: error: extended character is not valid in an identifier 31 | cin>>t; | ^ answer.code:32:1: error: extended character is not valid in an identifier 32 | while(t--) | ^ answer.code:32:3: error: extended character is not valid in an identifier 32 | while(t--) | ^ answer.code:33:1: error: extended character is not valid in an identifier 33 | { | ^ answer.code:33:3: error: extended character is not valid in an identifier 33 | { | ^ answer.code:34:1: error: extended character is not valid in an identifier 34 | cin>>n; | ^ answer.code:34:3: error: extended character is not valid in an identifier 34 | cin>>n; | ^ answer.code:34:5: error: extended character is not valid in an identifier 34 | cin>>n; | ^ answer.code:34:7: error: extended character is not valid in an identifier 34 | cin>>n; | ^ answer.code:35:1: error: extended character is not valid in an identifier 35 | int a; | ^ answer.code:35:3: error: extended character is not valid in an identifier 35 | int a; | ^ answer.code:35:5: error: extended character is not valid in an identifier 35 | int a; | ^ answer.code:35:7: error: extended character is not valid in an identifier 35 | int a; | ^ answer.code:36:1: error: extended character is not valid in an identifier 36 | int sum = 0; | ^ answer.code:36:3: error: extended character is not valid in an identifier 36 | int sum = 0; | ^ answer.code:36:5: error: extended character is not valid in an identifier 36 | int sum = 0; | ^ answer.code:36:7: error: extended character is not valid in an identifier 36 | int sum = 0; | ^ answer.code:37:1: error: extended character is not valid in an identifier 37 | int mmin = 10000000000; | ^ answer.code:37:3: error: extended character is not valid in an identifier 37 | int mmin = 10000000000; | ^ answer.code:37:5: error: extended character is not valid in an identifier 37 | int mmin = 10000000000; | ^ answer.code:37:7: error: extended character is not valid in an identifier 37 | int mmin = 10000000000; | ^ answer.code:38:1: error: extended character is not valid in an identifier 38 | int mmax = -10000000000; | ^ answer.code:38:3: error: extended character is not valid in an identifier 38 | int mmax = -10000000000; | ^ answer.code:38:5: error: extended character is not valid in an identifier 38 | int mmax = -10000000000; | ^ answer.code:38:7: error: extended character is not valid in an identifier 38 | int mmax = -10000000000; | ^ answer.code:39:1: error: extended character is not valid in an identifier 39 | if(n == 1) | ^ answer.code:39:3: error: extended character is not valid in an identifier 39 | if(n == 1) | ^ answer.code:39:5: error: extended character is not valid in an identifier 39 | if(n == 1) | ^ answer.code:39:7: error: extended character is not valid in an identifier 39 | if(n == 1) | ^ answer.code:40:1: error: extended character is not valid in an identifier 40 | { | ^ answer.code:40:3: error: extended character is not valid in an identifier 40 | { | ^ answer.code:40:5: error: extended character is not valid in an identifier 40 | { | ^ answer.code:40:7: error: extended character is not valid in an identifier 40 | { | ^ answer.code:41:1: error: extended character is not valid in an identifier 41 | cin >> a; | ^ answer.code:41:3: error: extended character is not valid in an identifier 41 | cin >> a; | ^ answer.code:41:5: error: extended character is not valid in an identifier 41 | cin >> a; | ^ answer.code:41:7: error: extended character is not valid in an identifier 41 | cin >> a; | ^ answer.code:41:9: error: extended character is not valid in an identifier 41 | cin >> a; | ^ answer.code:41:11: error: extended character is not valid in an identifier 41 | cin >> a; | ^ ans...