This file contains hidden or 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 <algorithm> | |
#include <string.h> | |
#include <vector> | |
using namespace std; | |
void permu(int all,int left,char str[],bool choosed[],vector<char> &temp); | |
bool cmp(char a,char b){ | |
return a<b; | |
} |
This file contains hidden or 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() | |
{ | |
int ans[77]; | |
ans[1]=1; | |
ans[2]=2; | |
ans[3]=2; | |
for(int i=4;i<=76;i++) | |
ans[i]=ans[i-2]+ans[i-3]; |
This file contains hidden or 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; | |
struct dictionary | |
{ | |
char l[20]; | |
int num; | |
}dic[10002]; | |
int main() |
This file contains hidden or 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 <algorithm> | |
using namespace std; | |
struct sortedDNA | |
{ | |
int num; | |
char *line; | |
}a[101]; | |
int bubble_sort(char a[],int n); |
This file contains hidden or 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<algorithm> | |
using namespace std; | |
struct cow{ | |
int T; | |
int D; | |
}; | |
bool cmp(cow a,cow b) | |
{ |
This file contains hidden or 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() | |
{ | |
int t,n,p_seq[25],parenthes[10000],n_p=0,i,j; | |
scanf("%d",&t); | |
while(t--){ | |
scanf("%d",&n); | |
for(p_seq[0]=0,i=1,n_p=0;i<=n;i++){ | |
scanf("%d",&p_seq[i]); |
This file contains hidden or 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; | |
long long int sum=0; | |
void func(int m,int n); | |
int main() | |
{ | |
int t,m,n,i,j; | |
scanf("%d",&t); | |
while(t--){ |
This file contains hidden or 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 <cmath> | |
using namespace std; | |
typedef long long int llt; | |
llt round(llt x){ //Team x到達哪個Round(在哪個Round 輸掉) | |
for(llt i=1,j=1;;i*=2,j++) | |
if(x%i) return j-1; | |
} | |
llt win(llt x){ //贏Team x的Team |
This file contains hidden or 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 <algorithm> | |
#include <cmath> | |
using namespace std; | |
struct point_type{ | |
double x; | |
double y; | |
}; | |
bool cmp(point_type a,point_type b) | |
{ |
This file contains hidden or 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 stk[32],nOfstk,Max,Max_pos; | |
void flip(int n); | |
//在code裡為求方便index是從左邊1,2,..,n到右邊,與題目的位置標示相反,在print的時候才換成題目的標示方法 | |
int main() | |
{ | |
char line[200]; | |
while(gets(line)){ |