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() | |
{ | |
string str; | |
bool curLetter; | |
bool preLetter; |
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
import java.util.Scanner; | |
import java.math.BigInteger; | |
public class JAVA { | |
public static void main(String[] args) { | |
Scanner cin = new Scanner(System.in); | |
String op; | |
BigInteger a, b, c = null; | |
while (cin.hasNext()) { | |
a = cin.nextBigInteger(); |
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> | |
#include <algorithm> | |
using namespace std; | |
bool cmp(const string& s1, const string& s2) | |
{ | |
return (s1 + s2).compare(s2 + s1) > 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 <iterator> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main(void) |
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 <cstdio> | |
using namespace std; | |
int main() { | |
float a,b,c,d,e,f; | |
while( scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f) != EOF ){ | |
float det = a*e - b * d; | |
float detX = c * e - b * f; | |
float detY = a * f - c * d; | |
if(det ==0 && detX ==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 <cstdio> | |
#include <cstring> | |
int main(void) | |
{ | |
int cnt; | |
char data[512] = ""; | |
scanf("%d", &cnt); | |
while(cnt--) |
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 <cstdio> | |
#include <iostream> | |
using namespace std; | |
int daysPerMon[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | |
bool isLeapYear(int year) | |
{ | |
return (year % 4 == 0 && year % 100 || year % 400 == 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 <cstdio> | |
int main() { | |
int a, b, n; | |
while(scanf("%d%d%d", &a, &b, &n) != EOF) | |
{ | |
printf("%d.", a / b), a = a % b; | |
for(int i = 0; i < n; 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 <cstdio> | |
int main() { | |
int n; | |
while(scanf("%d", &n) != EOF) | |
{ | |
int a; | |
long long int b, c; | |
for(int i = 0; i < n; 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 <cstdio> | |
#include <iostream> | |
using namespace std; | |
void prtPattern(int index, int right, int left, char *pattern) { | |
if(index == right && left == index) | |
{ | |
puts(pattern - 2 * index); | |
} |