mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-08 14:58:48 +00:00
parent
b836ec30ab
commit
697d8f7487
45
S2OJ/912/912.cpp
Normal file
45
S2OJ/912/912.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using std::cin;
|
||||||
|
using std::cout;
|
||||||
|
const char endl = '\n';
|
||||||
|
|
||||||
|
const int N = 1e5 + 5;
|
||||||
|
const int mod = 998244353;
|
||||||
|
|
||||||
|
int n, w[N], ans = 1;
|
||||||
|
|
||||||
|
int binpow(int a, int b, int m) {
|
||||||
|
int res = 1;
|
||||||
|
|
||||||
|
a %= m;
|
||||||
|
|
||||||
|
while (b) {
|
||||||
|
if (b & 1) res = static_cast<long long>(res) * a % m;
|
||||||
|
a = static_cast<long long>(a) * a % m;
|
||||||
|
b >>= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::ios::sync_with_stdio(false);
|
||||||
|
cin.tie(nullptr);
|
||||||
|
|
||||||
|
cin >> n;
|
||||||
|
|
||||||
|
for (int i = 1; i <= n; i++) {
|
||||||
|
cin >> w[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 2; i <= n; i++) {
|
||||||
|
ans = (static_cast<long long>(ans)
|
||||||
|
+ static_cast<long long>(w[i]) * binpow(w[i] + w[1], mod - 2, mod) % mod)
|
||||||
|
% mod;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << ans << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
S2OJ/912/data/ex_hunter1.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/ex_hunter1.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/ex_hunter1.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/ex_hunter1.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter1.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter1.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter1.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter1.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter10.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter10.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter10.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter10.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter11.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter11.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter11.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter11.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter12.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter12.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter12.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter12.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter13.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter13.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter13.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter13.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter14.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter14.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter14.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter14.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter15.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter15.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter15.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter15.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter16.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter16.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter16.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter16.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter17.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter17.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter17.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter17.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter18.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter18.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter18.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter18.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter19.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter19.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter19.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter19.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter2.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter2.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter2.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter2.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter20.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter20.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter20.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter20.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter3.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter3.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter3.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter3.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter4.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter4.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter4.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter4.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter5.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter5.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter5.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter5.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter6.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter6.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter6.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter6.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter7.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter7.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter7.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter7.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter8.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter8.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter8.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter8.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter9.in
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter9.in
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/hunter9.out
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/hunter9.out
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
S2OJ/912/data/problem.conf
(Stored with Git LFS)
Executable file
BIN
S2OJ/912/data/problem.conf
(Stored with Git LFS)
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user