This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include<string> | |
using namespace std; | |
int main() | |
{ | |
int N,Ans=1,Temp,i,f; | |
while (cin >> N) | |
{ | |
Ans = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int a[100002]; | |
int N, t1 = 0, t2 = 1; | |
a[0] = 0; | |
a[1] = 1; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<sstream> | |
#include<string> | |
using namespace std; | |
int main() | |
{ | |
string line; | |
stringstream ss; // put the line into these stream to input words from it intead of cin | |
string word; | |
while (getline(cin, line)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string line; | |
bool counte=false; | |
int size; | |
while (getline(cin, line)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
bool composite(int x) | |
{ | |
for (int i = x / 2; i > 1; i--) | |
{ | |
if (x%i == 0) | |
return true; | |
} | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int a[1009], b[1009],n,x,count=0; | |
bool fou = false; | |
a[0] = 0; | |
a[1] = 1; | |
cin >> n; | |
for (int i = 2; i < 1009; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string line; | |
char a; | |
bool rl=false; | |
int s1, s2, z1 = 0, z2 = 0, size; | |
__int64 f1 = 0, f2 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string line; | |
int size; | |
while (getline(cin, line)) | |
{ | |
size=line.size(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int x,i=0,f; | |
while (true) | |
{ | |
cin >> x; | |
if (x == 0) | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int n,a1,maxcount,max=0,premax=0; | |
while (cin >> n) | |
{ | |
premax = 0; max = 0; maxcount = 0; | |
for (int i = 0; i < n; i++) | |
{ |
OlderNewer