Submission #9558

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
95582014-09-28 07:15:43lemonsqueezePhibonacci (kriii2_P)C++98
4 / 4
0 ms1088 KiB
#include<stdio.h>
typedef long long ll;
const int MM = 1000000007;
struct llL{
llL(){d[0] = 0, d[1] = 0;}
llL(ll d0, ll d1){ d[0] = d0; d[1] = d1; } // d0*MM+d1
ll d[2];
llL operator+(const llL l) const{
llL ans = llL(0,0);
for(int i=0;i<2;i++){
ans.d[i] = l.d[i] + d[i];
}
ans.d[0] += ans.d[1] / MM;
ans.d[1] %= MM;
ans.d[0] %= MM;
return ans;
}
llL operator*(const llL l) const{
llL ans = llL(0,0);
ans.d[1] = d[1] * l.d[1];
ans.d[0] = d[1] * l.d[0] + d[0] * l.d[1];
ans.d[0] += ans.d[1] / MM;
ans.d[1] %= MM;
ans.d[0] %= MM;
return ans;
}
};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...