Skip to content

Instantly share code, notes, and snippets.

@WindAzure
WindAzure / Score.cpp
Last active September 16, 2018 16:26
UVa 1585
#include <stdio.h>
#include <string.h>
int main()
{
auto T = 0;
int dp[100] = { 0 };
char testResult[100];
scanf("%d", &T);
@WindAzure
WindAzure / Periodic Strings.cpp
Last active September 16, 2018 16:26
UVa 455
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
bool isStrComposeByBasisStr(string &str, string & basisStr, int period)
{
auto strLen = str.size();
for (auto index = period; index < strLen; index += period)
@WindAzure
WindAzure / Repeating Decimals.cpp
Last active September 16, 2018 16:25
UVa 202
#include <stdio.h>
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
auto a = 0, b = 0;
@WindAzure
WindAzure / Find the Border.cpp
Last active September 16, 2018 16:24
UVa 10340
#include <stdio.h>
#include <string.h>
using namespace std;
int main()
{
char s[1000], t;
while (~scanf("%s", s))
@WindAzure
WindAzure / Box.cpp
Last active September 26, 2018 16:17
UVa 1587
#include <stdio.h>
#include <vector>
using namespace std;
class Rectangle
{
public:
int width = 0;
int height = 0;
@WindAzure
WindAzure / Kickdown.cpp
Last active September 16, 2018 16:23
Uva 1588
#include <stdio.h>
#include <string.h>
#include <algorithm>
auto masterLen = 0, drivenLen = 0;
int masterSection[101], drivenSection[101];
bool IsDriftingDrivenSectionMatchMasterSection(int offset)
{
for (auto i = 0; i < drivenLen; i++)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sstream>
#include <iostream>
#include <vector>
#define MAX_A_DIGIT 10
#define MAX_A_DIGIT_POWER_2 1024
#define TOLERANCE 0.00001
#include <stdio.h>
#include <string.h>
#define MAX_ERROR_TIMES 7
char solutionStr[1000];
char guessStr[1000];
bool guessedCharacterTable[30];
auto solutionStrLen = 0;
auto guessStrLen = 0;
#include <stdio.h>
#include <string.h>
#define MAX_ERROR_TIMES 7
bool solutionCharacterTable[26];
bool guessCharacterTable[26];
int main()
{
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
auto N = 0;
vector<int> clockwise;
vector<int> anticlockwise;