QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#405365#6747. Permutationwifi32767Compile Error//C++206.5kb2024-05-05 19:58:022024-05-05 19:58:04

Judging History

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

  • [2024-05-05 19:58:04]
  • 评测
  • [2024-05-05 19:58:02]
  • 提交

answer

/*
                                       ____
                                          /|  |  |  |  l
                                     厂l  |  |  |  |
                                     | |  |  |  |  |
                                     | |_|_|_|_|
                                     { 个__o__}
                                     /|:i:厂\:i:i:i:i:i/^㍉
   八                                ./:i:|//¨ヽ  ̄ 彡、}
  i{  \                              .'/ハ|  艾_0  /<07|Y
  ,i{    寸                           .i人__|      {:.   |ノ
  i{      寸                           |:i:i:i:i:i:       /:.  ,'|
 ,i{        寸                             |:i:i:i:i八  /──-〉 /i|      那么开始投下
 ,i{         寸                       乂:i:i:i:| \     ./:iノ
 .i{          V                         .才:|   ≧寸彡ニ\
                 V                        .斗チ/ニl|    /ニニ    ー-
   乂       -─<{                      /   .|ニニ||   ./ニニ.     /  .V
     ` <   ∧ 寸厂V               /    .|ニニ||   /ニニ      /     ∨/
           ̄\ \ 寸              /      |ニニ||  //ニニ     /       ∨/
            / >v \            / .|    |ニニ|| .//ニニ     |       .V/
          / /./ 〉ハ',          /  |    |ニニ||//ニニ.      |        .∨/
          .{  / / ∨.|ニ\       /   |    |ニニ||/ニニ        |          ∨/
          .\. / /Vノニニ.\   ./     |    |ニニ|ニニ       |         ∨/
            \  ∨厂`)ニ.  寸<       .|    |ニニ|ニニ|       |          .∨/
              .\ 乂/ニ    \ \     |  |\|ニニニニニ|.∧       |           ∨/
              |ー::ニニニ      |  |    .|  |二ニニニニニニ|.      |             .∨/
              |ーニニニ            |  ⌒/ニニニ{ 寸     |              ∨/
              |ーニニニ            |   ./二/ Vニ.        |            ∨/
              |ーニニニ             |  /二/  |ニニ       |
              |=ニニニ            |  /二/   .|ニニ       |                                            ┛
*/
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define ll long long
#define ull unsigned long long
#define pii pair<ll, ll>
const int MAX = 2e6 + 10, mod = 998244353;
 
struct BIT{ //单点更新,区间查询
    int n;
    vector<ll> sum;
	BIT(const int &n = 0) : n(n + 5), sum(n + 5){}
    int lowbit(int x){
        return x & (-x);
    }
    void add(int pos, ll val){
        for (; pos <= n; pos += lowbit(pos))
            sum[pos] += val;
    }
    ll query(int pos){
        ll res = 0;
        for (; pos > 0; pos -= lowbit(pos))
            res += sum[pos];
        return res;
    }
    ll query(int l, int r){
        return query(r) - query(l - 1);
    }
};
ll power(ll x, int y){
    ll ans = 1;
    while (y){
        if (y & 1) ans *= x, ans %= mod;
        x *= x, x %= mod;
        y >>= 1;
    }
    return ans;
}
struct Hash{
    const ull P = 11037;
    int n;
    vector<ull> p, h1, h2;
    void init(string &s){
        n = s.size() - 1;
        p.resize(n + 2), h1.resize(n + 2), h2.resize(n + 2);
        p[0] = 1; h1[0] = 0, h2[n + 1] = 0;
        for(int i = 1 ; i <= n ; i ++) p[i] = p[i - 1] * P;
        for(int i = 1 ; i <= n ; i ++) h1[i] = h1[i - 1] * P + s[i];
        for(int i = n; i >= 1; -- i) h2[i] = h2[i + 1] * P + s[i];
    }
    ull get(int l, int r) { 
        return h1[r] - h1[l - 1] * p[r - l + 1];
    }
    ull get_rev(int l, int r){
        return h2[l] - h2[r + 1] * p[r - l + 1];
    }
};
// ll fac[MAX], inv[MAX];
// void init(int n){
//     fac[0] = 1;
//     for (int i = 1; i <= n; ++ i) fac[i] = fac[i - 1] * i % mod;
//     inv[n] = power(fac[n], mod - 2);
//     for (int i = n; i >= 1; i -- ) inv[i - 1] = inv[i] * i % mod;
// }
// ll cal(int x, int y){
//     if (y > x) return 0;
//     return (fac[x] * inv[y] % mod) * inv[x - y] % mod;
// }

int n;
void solve(){
    cin >> n;
    for (int i = 1; i <= n; ++ i) cout << a[i] << ' ';
}
signed main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	// cout << fixed << setprecision(6);
    // init();
    // int _;cin>>_;while (_ --)
        solve();
}

Details

answer.code: In function ‘void solve()’:
answer.code:106:43: error: ‘a’ was not declared in this scope
  106 |     for (int i = 1; i <= n; ++ i) cout << a[i] << ' ';
      |                                           ^