✟『今天的钟声,格外吵闹』✟
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,mod;
struct node{
ll x[3][3]={{0,0,0},{0,0,0},{0,0,0}};
};
node fib,a,t;
node mult(node aa,node b){
node c;
for(int i=1;i<=2;i++){
for(int j=1;j<=2;j++){
for(int k=1;k<=2;k++){
c.x[i][j]=(c.x[i][j]+aa.x[i][k]b.x[k][j])%mod;
// cout<<i<<” “<<j<<” “<<c.x[i][j]<<“\n”;
}
}
}
return c;
}
void Kruskal(ll b){
t.x[1][1]=t.x[1][2]=1;
while(b){
if(b&1) t=mult(t,a);
node aa=mult(a,fib);
a=mult(aa,mult(aa,fib));
// cout<<a.x[1][1]<<” “<<a.x[1][2]<<“\n”;
b>>=1;
}
}
int main(){
cin>>n>>mod;
if(n==1||n==2){
cout<<1%mod<<“\n”;
return 0;
}
n-=2;
fib.x[1][1]=0;
fib.x[1][2]=fib.x[2][1]=fib.x[2][2]=1;
a.x[1][1]=a.x[1][2]=1;
// cout<<mult(mult(mult(mult(a,fib),fib),fib),fib).x[1][1]<<” “<<mult(mult(mult(mult(a,fib),fib),fib),fib).x[1][2]<<“\n”;
Kruskal(n);
cout<</t.x[1][1]<<” ”<</t.x[1][2]%mod<<“\n”;
return 0;
}
/
f n=f n-1+f n-2
f n-2 0 1 f n-1
f n-1 1 1 f n
f 1 2 fib 2 2
*/
你有多久没有仰望星空了
好像,星星本不应该低头看的
------------------------------------ฏ้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้------------------------------------
加强6


岛支书的美貌就是天下第一!!!

三位傻子(假装友链
☦☦☦☦☦
这个是我的宝宝

宝宝我喜欢你❤️
还是朋友
☦☦☦☦☦

あなたは敵だけど悪くない
年年今日,灯明如昼。原火不灭,愿人依旧
愿用余生换半城烟雨,半城繁花
两个人从监狱的窗户往外看,一个看见了土地,一个看见了星星
新王把利剑刺入旧王的胸膛,将旧王的冠冕摘下而戴在自己的头上
辉煌时刻不常有,能装多久是多久
即得易见平凡,仿照上例显然。
留作习题答案略,读者自证不难。
反之亦然同理,推论自然成立。
略去过程QED,由上可知证毕。
SelfIntroductionGod rest ye merry gentlemen
Let nothing you dismay
Remember Christ our Savior
Was born on Christmas Day
To save us all from Satan′spower
When we were gone astray
Oh tidings of comfort and joy
Comfort and joy
Oh tidings of comfort and joy
I LOVE YOU
BUT IT SEEMS THAT YOU WILL NEVER KNOW
red
tomato
rosybrown
orange
yellow
khaki
palegoldenrod
wheat
green
seagreen
teal
yellowgreen
springgreen
palegreen
turquoise
paleturquoise
blue
navy
royalblue
steelblue
skyblue
powderblue
purple
slateblue
plum
violet
thistle
pink
palevioletred
salmon
peachpuff
seashell
brown
saddlebrown
sienna
sandybrown
peru
tan
papayawhip
gray
slategray
silver
white
beige
whitesmoke
snow
black
I
LOVE
YOU
其实是
dev紫色系
160 240 180
170 229 200
140 240 197
156 157 183
180 94 144
150 74 173
120 40 180
170 240 160
175 101 173
160 83 191
150 73 135
Black
160 237 172
160 229 160
前White 后160 240 220
139 40 156
139 40 156
前White 后160 99 160
后0 240 172
前Black 后White
↑
来自 jzwjx
C++ 编辑器语法(蓝色系)
建议搭配字体 Fixedsys 食用
Space:
前:Black
后:E133,S42,L232
Reserved Word:
前:E150,S73,L135
Preprocessor:
前:E160,S83,L191
Octal:
前:E175,S99,L173
Number:
前:E141,S240,L172
Active breakpoints:
前:White
后:E0,S240,L215
Error line:
前:E141,S240,L198
后:E0,S240,L215
Breakpoints:
前:White
后:Silver
Gutter:
前:E139,S40,L156
后:E142,S48,L219
Selected text:
前:White
后:E132,S240,L204
Illegal Char:
前:E120,S40,L180
Identifier:
前:E150,S74,L173
Hexadecimal:
前:E180,S94,L144
Float:
前:E156,S156,L183
Comment:
前:E140,S240,L197
String:
前:E120,S237,L172
Symbol:
前:E149,S193,L158
↑
来自_UwU_x