QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#745064#8165. Numerous Eliminationucup-team3646WA 0ms3684kbC++201.0kb2024-11-14 02:48:232024-11-14 02:48:24

Judging History

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

  • [2024-11-14 02:48:24]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3684kb
  • [2024-11-14 02:48:23]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep2(i, l, r) for (ll i = l; i < r; i++)

using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;

/* ---- */
#define all(A) A.begin(), A.end()
#define elif else if
using pii = pair<ll, ll>;

bool chmin(auto &a, const auto &b) { return a > b ? a = b, 1 : 0; }
bool chmax(auto &a, const auto &b) { return a < b ? a = b, 1 : 0; }

struct IOSetup {
  IOSetup() {
    cin.tie(0);
    ios::sync_with_stdio(0);
  }
} iosetup;

template <class T>
void print(vector<T> a) {
  for (auto x : a) cerr << x << ' ';
  cerr << endl;
}

void print(auto x) { cerr << x << endl; }

template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail) {
  cerr << head << ' ';
  print(forward<Tail>(tail)...);
}

const ll mod = 998244353;

int main(){
  int n;
  cin>>n;
  ll ans=1;
  rep(i,n){
    ans*=2;
    ans%=mod;
  }
  ans-=n-1;
  cout<<(ans%mod+mod)%mod<<endl;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3684kb

input:

3

output:

6

result:

wrong answer 1st words differ - expected: '4', found: '6'