QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#184794#6443. Windblume FestivalKAZE_mae#Compile Error//C++171.4kb2023-09-21 12:45:102023-09-21 12:45:11

Judging History

你现在查看的是最新测评结果

  • [2023-09-21 12:45:11]
  • 评测
  • [2023-09-21 12:45:10]
  • 提交

answer

#include<bits[表情]dc++.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;
        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 += mmax*2;
        }
        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:1:9: fatal error: bits[表情]dc++.h: No such file or directory
    1 | #include<bits[表情]dc++.h>
      |         ^~~~~~~~~~~~~~~~~~
compilation terminated.