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 N,M; // N:牛奶瓶數量 M:容器數量 | |
int n[1000001]; // 牛奶瓶的個別容積 | |
int main() | |
{ | |
while (scanf("%d%d",&N,&M)!=EOF){ | |
int left=0,right=0,mid; |
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; | |
#define F(x) (p*exp(-x) + q*sin(x) + r*cos(x) + s*tan(x) + t*pow(x,2) + u) | |
int main() | |
{ | |
int p, q, r, s, t, u; | |
while (scanf("%d %d %d %d %d %d",&p, &q, &r, &s, &t, &u)!=EOF) | |
{ |
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; | |
int N,Q,Case=1; | |
int n[10001],q[10001]; | |
int Search (int q) | |
{ | |
int L=0, R=N-1, mid; |
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; | |
int M, K; | |
int p[501]; | |
int ans[501][501],n[501]; // n is the index of ans[i]; | |
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> | |
using namespace std; | |
char s[100000],t[100000]; | |
int main() | |
{ | |
// freopen ("input.txt","rt",stdin); | |
while (scanf("%s%s",s,t)!=EOF){ | |
int i=0,j=0; |
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; | |
int main() | |
{ | |
// freopen("input.txt","rt",stdin); | |
int N; | |
while (scanf("%d",&N)!=EOF){ | |
int s[3001],check[3001]={0}; | |
bool ok=1; |
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() | |
{ | |
// freopen ("input.txt","rt",stdin); | |
int N; | |
int x,y; | |
scanf("%d",&N); | |
while (N--){ | |
scanf("%d%d",&x,&y); |
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; | |
char line[100000]; | |
bool is_word (char a){ | |
if (a<='z' && a>='a' || a<='Z' && a>='A') | |
return 1; | |
return 0; | |
} | |
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; | |
int main() | |
{ | |
int a,b; | |
while (scanf("%d%d",&a,&b)!=EOF){ // 43,19 | |
printf("[%d;",a/b); // [2; | |
a %= b; // 5,19 | |
while(a!=1){ |
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; | |
typedef long long int llt; | |
llt a[21][21]; | |
void max_1(llt &A,llt n,llt i,llt j) | |
{ | |
llt Max = 0; | |
for (llt k=i+1; k<=n; k++) |