QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#204991#7562. Except Oneucup-team1479#AC ✓1ms3588kbC++141.5kb2023-10-07 14:34:012023-10-07 14:34:01

Judging History

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

  • [2023-10-07 14:34:01]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3588kb
  • [2023-10-07 14:34:01]
  • 提交

answer

#include<bits/stdc++.h>
#define RI int
#define err puts("asd")
#define ll long long
#define ull unsigned long long
#define LL __int128
#define db double
#define mk make_pair
#define FL fflush(stdout)
#define eb emplace_back
#define FR(u,v) for(int i=h[u],v=a[i].t;i;i=a[i].n,v=a[i].t)
#define FB(x,z,y) for(int y=LG[(x)&-(x)],z=x;z;z^=z&-z,y=LG[z&-z])
#define FS(x,y) for(int y=(x);y;y=(y-1)&(x))
#define mem(a,b) memset(a,b,sizeof a)
#define yes puts("Yes")
#define no puts("No")
#define gg puts("-1")
#define vc vector
#define ex exit(0)
#define fi first
#define se second
//#define int long long
//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
using namespace std;

const db eps=1e-10;
const int inf=2e9+5;
const ll INF=1e18;
int mod=998244353;

inline ll power(ll x,int y){
ll t=1;
while(y){
if(y&1) t=t*x%mod;
x=x*x%mod;y>>=1;
}
return t;
}

inline void gt(int &x,int &y){if(x>y) swap(x,y);}

inline void cmax(int &x,int y){x<y?x=y:0;}

inline void cmin(int &x,int y){x>y?x=y:0;}

inline void AD(int &x,int y){x+=y;if(x>=mod) x-=mod;}

inline ll read(){
ll s=0;char c=getchar();bool f=0;
while(c<'0'||c>'9'){if(c=='-') f=1;c=getchar();}
while(c>='0'&&c<='9') s=(s<<1)+(s<<3)+c-48,c=getchar();
return f?-s:s;
}


signed main(){
ll op,x=0,y=0,z=0,u=0,v=0;
//freopen("1.in","r",stdin);
//freopen("1.out","w",stdout);
mod=read();ll k=read(),t=read();
cout<<power(mod-k,t);
return 0;
}


//颓入膏肓,没救了,有无神医相救?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3412kb

input:

7 5 3

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3424kb

input:

11 6 7

output:

3

result:

ok 1 number(s): "3"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3348kb

input:

3 2 1

output:

1

result:

ok 1 number(s): "1"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

596620183 516846890 38276329

output:

135352707

result:

ok 1 number(s): "135352707"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3412kb

input:

382744931 85302262 235496559

output:

14577469

result:

ok 1 number(s): "14577469"

Test #6:

score: 0
Accepted
time: 1ms
memory: 3540kb

input:

659446013 641119314 378275666

output:

290624162

result:

ok 1 number(s): "290624162"

Test #7:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

227 163 124

output:

189

result:

ok 1 number(s): "189"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3356kb

input:

197 187 19

output:

62

result:

ok 1 number(s): "62"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3408kb

input:

5 3 3

output:

3

result:

ok 1 number(s): "3"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

7 6 4

output:

1

result:

ok 1 number(s): "1"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3376kb

input:

7 1 1

output:

6

result:

ok 1 number(s): "6"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3372kb

input:

782371 586755 418517

output:

298550

result:

ok 1 number(s): "298550"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

181081 178315 76002

output:

125177

result:

ok 1 number(s): "125177"

Test #14:

score: 0
Accepted
time: 0ms
memory: 3344kb

input:

715019 492103 446729

output:

221541

result:

ok 1 number(s): "221541"

Test #15:

score: 0
Accepted
time: 1ms
memory: 3340kb

input:

238985261 199832612 162675695

output:

65826267

result:

ok 1 number(s): "65826267"

Test #16:

score: 0
Accepted
time: 1ms
memory: 3288kb

input:

129716453 10994076 62963738

output:

5186275

result:

ok 1 number(s): "5186275"

Test #17:

score: 0
Accepted
time: 1ms
memory: 3420kb

input:

962360593 652577122 345596237

output:

814039152

result:

ok 1 number(s): "814039152"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

871606937 839183139 754188014

output:

466391387

result:

ok 1 number(s): "466391387"

Test #19:

score: 0
Accepted
time: 0ms
memory: 3344kb

input:

275568091 270750503 241146839

output:

252569968

result:

ok 1 number(s): "252569968"

Test #20:

score: 0
Accepted
time: 1ms
memory: 3376kb

input:

562028473 111749710 450258818

output:

63116256

result:

ok 1 number(s): "63116256"