LightOj 1133 Array Simulation Add Comment Edit #include <bits/stdc++.h> using namespace std; int main() { int t,n,m,i,j,a[1000],b[1000],k,l,p; string s; //freo... Read More
LightOj 1043 Triangle Partitioning Add Comment Edit Hints: ADE/ABC=DE^2/BC^2 and AD/AB=DE/BC #include <bits/stdc++.h> using namespace std; int main() { int t,i,j; flo... Read More
LightOj 1116 Ekka Dokka Add Comment Edit #include <bits/stdc++.h> using namespace std; int main() { long long int l,m,t,w,y,z,h,x,p,q,n; //freopen("input... Read More
LightOj 1109 - False Ordering Add Comment Edit #include <bits/stdc++.h> using namespace std; #define n 1000005 bool a[n]; long long int k=1; long long int twin[n],i,j,t; bool... Read More
LightOj 1189 Sum of Factorials Add Comment Edit Hints: The highest number n is 10^18 . So highest factorial is 20! . So at first pre calculate factorials from 0 to 20. Then check fro... Read More
LightOj 1024 EID Add Comment Edit N:B :- Use Garbage Collector System.gc() after print to clear garbages and reduce memory size . import java.math.*; import java.util... Read More
LightOj 1179 Josephus Problem Add Comment Edit Tutorial : Josephus Problem #include <bits/stdc++.h> using namespace std; int lastman(int n,int k) { if(n==1) {... Read More
LightOj 1042 Secret Origins Add Comment Edit #include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,n,m,a[100000],d,b[100000],sum; ... Read More