-
-
20最近做梦略多,而且充满神秘色彩,打算记录下来。 与某日本游戏无关。。。
-
31L喂熊
-
1纯属用来丰富代码库用的 实在不想用c++做字符串有关的一切。 度熊不要吞缩进!!! const has=10169; var d:array[0..12200]of string; i,n,m,ans:lon
-
5const zero=1e-7; var wyw,m,n,tt,t2,r,i,j,rec1,rec2:longint; max,jx,jy:extended; f:array[0..2]of longint; lgx,lgy:array[0..2]of extended; a,b
-
1我实在怕我忘了,先记录一下,听巧妙的。
-
1var s,p:string; i,j,k:longint; next:array[1..1000]of longint; begin readln(s); readln(p); j:=1; k:=0; next[j]:=k; while j<=length(p) do b
-
0var a,n,t:qword; begin readln(a,n); t:=a; a:=1; while n>0 do begin if n and 1=1 then a:=a*t; n:=n shr 1; if n<=0 then break; t:=t*t; e
-
10type tree=record next:array['a'..'z']of longint; g:boolean; end;vara:array[1..1000]of tree;i,j,n,m,now,e:longint;s:string;ans:boolean;begin
-
5type treenode=record l,r,sum,size,max,min:longint; end;varc,d:longint;tree:array[1..10000]of longint; procedure maketree(a,b,c:longint);var
-
9var a,c:array[1..100000]of longint; i,j,n,x,y,p,q,l,r:longint; function lowbit(i:longint):longint; begin exit(i and (i xor (i-1))); end; pro
-
6一个模版,其实好多部分还是和zxk的一样啊。
-
0杂题是那些算法不落入语言学范畴与标准解决方案的问题。每一个杂题都是不同的,不存在一般或具体的解决方案。 当然这是问题变得有趣,因为每个人都面
-
0顺便翻译一下练练英语 哈尔波奇在1999年的春假进行分析得到了一个惊人的发现:程序设计竞赛的问题只有16种类型!此外,IOI中几乎可以看到80%的问
-
6好吧用C++的USACO第一题 其实这段不能完全算原创的 #include <iostream> using namespace std; int happy(char *s) { int v=1; while (*s) { v*
-
6主要是语言上的
-
0这是我用C++在OJ上AC的第一题 #include <iostream> using namespace std; int main() { int n,i,x,y,ans; int a[10003][4]; cin>>n; for
-
4#include "iostream" using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b; return 0; }
-
6var f:array[1..100,0..100]of longint; i,n,m,x,y,k:longint; function max(a,b:longint):longint; begin if a>b then exit(a); exit(b); end; pr
-
2var dig:array[1..100]of longint; sym:Array[1..100]of char; i,k,t,l,l1,l2:longint; s:string; function happy(x,y:longint;c:char):longint; var
-
1也叫做没有上司的晚会、没有上司的舞会
-
0var d:array[1..100]of longint; f,g:array[0..100,0..100]of longint; i,j,n:longint; function happy(s,t:longint):longint; var i,x:longint; begi
-
0我的第一道一遍AC的树形动规 type treeee=record lc,rc,num:longint; end; var a:array[1..100,1..100]of longint; f:array[1..100,0..100]of longint
-
3const ji:array[0..9]of longint=(0,1,2,6,24,120,720,5040,40320,362880); var x,n:longint; function happy(x:longint):longint; var a:array[1..10
-
0No.1: 清理垃圾 - -! @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del
-
1var a:array[1..100,1..100]of longint; v:array[1..100]of boolean; i,j,n,min,t,p:longint; begin readln(n); for i:=1 to n do begin for j:=1 to
-
2var a:array[1..100]of longint; i,n:longint; procedure swap(var x,y:longint); var k:longint; begin x:=x xor y; y:=x xor y; x:=x xor y; end; p
-
2拓扑排序 var a:array[1..100,1..100]of longint; b,f:array[1..100]of longint; i,j,k,n,m,x,y:longint; begin readln(n,m); for i:=1 to m do begin
-
1压位的 var a:array[1..10000]of int64; s,ans:ansistring; i,j,n,w,t,q:longint; begin readln(n,t); w:=1; a[1]:=n; if a[1]>=10000 then begin
-
0计算最长不降子序列的个数 var i,j,n,ans,max:longint; a,f,t:array[1..1000]of longint; begin readln(n); for i:=1 to n do readln(a[i]); t[1]:=1;
-
0var a:array[1..100,1..100]of longint;d:array[1..100]of longint;v:array[1..100]of boolean;i,j,n,min,t,now,ans:longint;begin readln(n); for i:
-
1typetree=record data,l,r:longint;end;vart:array[1..100]of tree;i,n,a:longint;procedure inorder(x:tree);begin if x.l<>0 then inorder(t[
-
1const d:array[1..4,1..2]of longint=((-1,0),(0,-1),(1,0),(0,1));type tc=array[1..500]of boolean;var a:array[1..500,1..500]of longint; b:array
-
0var a,b,c,s,f:array[1..1000]of longint;i,n,m,sa,sb:longint;procedure com(a,b:longint);begin s[f[a]]:=(s[a]+1) mod 2; f[f[a]]:=b;end;function
-
2多叉树转二叉树(非递归) type tree=record left,right:logint;end;vara:array[1..100,1..100]of longint;b:array[1..100]of tree;i,j,k,l,t,n:longi
-
5var a:array[1..100]of longint; n,m,p,i,x,y,xx,yy:longint; begin readln(n,p); for i:=1 to p do a[i]:=i; for i:=1 to n do begin readln(x,y); a
-
0type pe=^data; data=record num:integer; next:pe; end; var p,q,head:pe; i,x,n,s:integer; begin readln(x); readln(n); new(q); q^.num:=1; head:
-
1var a,b:array[1..10000]of longint; i,s,t,n,m,k,x:longint; begin readln(n); readln(k); readln(a[1]); writeln(a[1]); b[1]:=1; s:=1; t:=1; for
-
1var a,b,c,f:array[1..1000]of longint; p,cc,ans,i:longint; function get(x:longint):longint; begin if x=f[x] then exit(x); f[x]:=get(f[x]); ex
-
0二分优化的 var a:array[1..100]of longint; b:array[1..100]of longint; i,n,s,h:longint; procedure erfen(x,y:longint); var w:longint; begin &nb
-
0assign(input,' .in'); assign(output,' .out'); reset(input); rewrite(output); close(input); close(output);
-
0var a:array[1..100,1..100]of longint; i,j,k,n,m,x,y:longint; begin readln(n,m); filldword(a,sizeof(a) div 4,maxlon
-
4var a:array[1..100,1..100]of longint; b:array[1..100,0..100]of longint; f:array[1..100]of longint; d:array[1..100]of longint; v:array[1..100