QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#745064 | #8165. Numerous Elimination | ucup-team3646 | WA | 0ms | 3684kb | C++20 | 1.0kb | 2024-11-14 02:48:23 | 2024-11-14 02:48:24 |
Judging History
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;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3684kb
input:
3
output:
6
result:
wrong answer 1st words differ - expected: '4', found: '6'