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
type | |
seg=record | |
left,right:longint; | |
add,sum:int64; | |
end; | |
var | |
a:array [0..500000] of seg; | |
n,k,l,r,i:longint; | |
order:char; |
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
var | |
n,t,m,i,ans:longint; | |
f:array ['0'..'9'] of boolean; | |
ch:char; | |
g:boolean; | |
procedure test(p:longint); | |
var | |
s:string; | |
t:boolean; |
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
const | |
maxn=132000; | |
type | |
segment=record | |
left,right,cov,res:longint; | |
//cov:cover | |
//res:reverse | |
end; |
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 <stdio.h> | |
#define maxn 8010 | |
int a[maxn],used[maxn]; | |
struct segment { | |
int left,right,count; | |
} tree[maxn*3]; |
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 <stdio.h> | |
#define maxn 200010 | |
int a[maxn]; | |
struct segment { | |
int left,right,count; | |
} tree[maxn*3]; |
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 <stdio.h> | |
#include <string.h> | |
#include <algorithm> | |
struct segment { | |
int left,right,color; | |
} a[275000]; | |
bool f[50]; | |
void segtree_create(int p, int l, int r); |
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 <stdio.h> | |
#include <string.h> | |
const int maxn=100010; | |
struct segment { | |
int left,right; | |
int count; | |
} a[maxn*2]; | |
int f[maxn],k; |
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 <limits.h> | |
#include <string.h> | |
using namespace std; | |
const int maxn=8000,no_color=-1,multi_color=-2; | |
int flags[maxn]; |
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 <stdio.h> | |
#include <string.h> | |
const int maxn=10005,maxm=1000005; | |
int next[maxn],n; | |
char text[maxm],pat[maxn]; | |
inline void get_next() { | |
int m=strlen(pat),k=-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
/* | |
ID: dennis.5 | |
PROG: ride | |
LANG: C++ | |
*/ | |
#include <fstream> | |
#include <string> | |
using namespace std; |