A Ares, Toilet Ares
题意
略,模拟即可
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int ll
typedef long long ll;
const int mod = 4933;
const int N = 1e6 + 7;
ll a[N];
ll qkpow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
ll getInv(ll a) { return qkpow(a, mod - 2); }
signed main() {
int n, m, k, ax, l;
cin >> n >> m >> k >> ax >> l;
int up = 1, down = 1, x, y, z;
while (k--) {
cin >> x >> y >> z;
if(!x) continue;
up = ((z - y) * up ) % mod;
down = down * z % mod;
}
cout << (up + ax * down) * getInv(down) % mod << endl;
return 0;
}
E Rise of Shadows
既是闰年又是质数?
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
cout << "no" << endl;
}
signed main() {
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int t;
cin >> t;
while (t--)
solve();
return 0;
}