比赛 |
HAOI2019 Day1 |
评测结果 |
WWWWWWWWWWWWWWWW |
题目名称 |
骗分过样例 |
最终得分 |
0 |
用户昵称 |
冷月星云 |
运行时间 |
0.917 s |
代码语言 |
C++ |
内存使用 |
0.00 MiB |
提交时间 |
2022-03-17 21:02:14 |
显示代码纯文本
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
ull qpow(ull a, ull n)
{
if (n == 0)
return 1;
else if (n % 2 == 1)
return qpow(a, n - 1) * a % 998244353;
else
{
ull temp = qpow(a, n / 2) % 998244353;
return temp * temp % 998244353;
}
}
int first(){
ull a , b ,c;
cin >> c;
for(int j = 1;j <= c;j++){
a = 19;
cin >> b ;
a = qpow(19 , b) % 998244353;
a = a % 998244353;
cout << a << endl;
}
return 0;
}
int six(){
int a = 19;
cout << 1 << endl;
for(int i = 1;i < 100000;i++){
cout << a << endl;
a = (int)(a % 998244353 * 19 % 998244353);
}
}
void eight(){
int w;
cin >> w;
for(int q = 1;q <= w;q++){
int a , b;
cin >> a >> b;
int v[1000050];
memset(v, 0 , sizeof(v));
for(int i = a;i <= b;i++){
if(v[i] == 1){
cout << ".";
continue;
}
cout << "p";
for(int j = i;j <= b / i;j++){
v[i * j] = 1;
}
}
cout << endl;
}
}
int main(){
freopen( "haoi2019_software.in" , "r" , stdin );
freopen( "haoi2019_software.out" , "w" , stdout );
string s;
cin >> s;
cout << 123;
if(s == "1_998244353"){
first();
return 0;
}
if(s == "1wa_998244353"){
six();
return 0;
}
if(s == "2p"){
eight();
return 0;
}
return 0;
}