↓ 跳过正文
  1. Posts/

sssssad

·319 字·1 分钟

依然对算法,对acm充满热情。

只是比赛,组队赛。

心里满满的都是阴影,再也没有什么热情与感动。

连起队名这种事情我都不愿意想了。

起得再棒有什么用。

pacedect 这名字。

说起来好像有一个学期没和某妹子说话了。。。。。。。。

sssssad.

真是是坟墓般的荒芜

不是痛,只是不允许任何人触碰2333

算了,自己开心就好

我发现,当我刷题,当我学习新算法,打比赛就算被虐,我也是开心的。

可是如果是组队赛,就会想起pacedect 的那些美好与痛苦,想起恩怨情仇…

所以那段时间不搞acm,完全不记得这些,我也是开心的。

组队什么的随它去吧。

真的真的无所谓。

我是真的怕了,怕投入太多感情,到头来却……..

所以说acm要是一个人的比赛就好了呢。

晚安。

相关文章

cf #314 B. Berland National Library (模拟)

·456 字·1 分钟
给出一个图书馆人员进出情况,问图书馆满足题意的最小容量是多少。 注意在初始之前图书馆里面可能就有人了,也就是说不是所有进入图书馆的人都会被给出。 我的做法是先统计出图书馆里面初始的人数,开一个布尔数组,初始全为false,如果一个人标记为 false 而且从 图书馆里出来了,就说明这个人初始是在图书馆里的。

codeforces #314 A. Lineland Mail

·212 字·1 分钟
给一个有序序列,问对于没一个数,和它相差最少和最多的数的位置。 代码实现 1/************************************************************************* 2 > File Name: code/cf/#314/A.cpp 3 > Author: 111qqz 4 > Email: rkz2013@126.com 5 > Created Time: 2015年08月06日 星期四 00时01分51秒 6 ************************************************************************/ 7 8#include<iostream> 9#include<iomanip> 10#include<cstdio> 11#include<algorithm> 12#include<cmath> 13#include<cstring> 14#include<string> 15#include<map> 16#include<set> 17#include<queue> 18#include<vector> 19#include<stack> 20#define y0 abc111qqz 21#define y1 hust111qqz 22#define yn hez111qqz 23#define j1 cute111qqz 24#define tm crazy111qqz 25#define lr dying111qqz 26using namespace std; 27#define REP(i, n) for (int i=0;i<int(n);++i) 28typedef long long LL; 29typedef unsigned long long ULL; 30const int inf = 0x7fffffff; 31const int N=2E5+7; 32LL a[N]; 33int main() 34{ 35 int n; 36 cin>>n; 37 a[0]=-inf; 38 a[n+1]=inf; 39 40 for ( int i = 1 ; i <= n ; i ++ ) 41 { 42 cin>>a[i]; 43 } 44 int mx = -1; 45 int mi = inf; 46 cout<<a[2]-a[1]<<" "<<a[n]-a[1]<<endl; 47 for ( int i = 2 ; i <= n-1 ; i++ ) 48 { 49 cout<<min(abs(a[i]-a[i-1]),abs(a[i+1]-a[i]))<<" "<<max(abs(a[i]-a[1]),abs(a[n]-a[i]))<<endl; 50 } 51 cout<<a[n]-a[n-1]<<" "<<a[n]-a[1]<<endl; 52 return 0; 53}

hdu 5305 Friends (dfs)

·314 字·1 分钟
dfs 1A 代码实现 1/************************************************************************* 2 > File Name: code/whust/#9/K.cpp 3 > Author: 111qqz 4 > Email: rkz2013@126.com 5 > Created Time: 2015年08月05日 星期三 15时02分30秒 6 ************************************************************************/ 7 8#include<iostream> 9#include<iomanip> 10#include<cstdio> 11#include<algorithm> 12#include<cmath> 13#include<cstring> 14#include<string> 15#include<map> 16#include<set> 17#include<queue> 18#include<vector> 19#include<stack> 20#define y0 abc111qqz 21#define y1 hust111qqz 22#define yn hez111qqz 23#define j1 cute111qqz 24#define tm crazy111qqz 25#define lr dying111qqz 26using namespace std; 27#define REP(i, n) for (int i=0;i<int(n);++i) 28typedef long long LL; 29typedef unsigned long long ULL; 30const int inf = 0x7fffffff; 31int n ,m,ans; 32int d[50]; 33int on[50],off[50]; 34int u[50],v[50]; 35 36bool ok(int x,int y) 37{ 38 if ( !d[x] && !d[y] && on[x] == off[x] && on[y] == off[y] ) 39 return true; 40 if ( !d[x] && d[y] && on[x] == off[x] ) 41 return true; 42 if ( d[x] && !d[y] && on[y] == off[y] ) 43 return true; 44 if ( d[x] && d[y] ) 45 return true; 46 return false; 47} 48 49void dfs ( int i) 50{ 51 if (i==m) 52 { 53 ans++; 54 return; 55 } 56 int x = u[i]; 57 int y = v[i]; 58 d[x]--; 59 d[y]--; 60 on[x]++; 61 on[y]++; 62 if (ok(x,y)) 63 dfs (i+1); 64 on[x]--;on[y]--; 65 off[y]++;off[x]++; 66 if ( ok( x,y)) 67 dfs (i+1); 68 off[y]--; 69 off[x]--; 70 d[x]++; 71 d[y]++; 72} 73 74int main ( ) 75{ 76 int T; 77 cin>>T; 78 while ( T-- ) 79 { 80 ans = 0; 81 scanf ("%d %d",&n,&m); 82 memset (d,0,sizeof(d)); 83 memset (on,0,sizeof(on)); 84 memset (off,0,sizeof(off)); 85 for ( int i = 0 ; i < m ; i++ ) 86 { 87 scanf ("%d%d",&u[i],&v[i]); 88 d[u[i]]++; 89 d[v[i]]++; 90 } 91 dfs (0); 92 printf ( "%d\n" , ans ); 93 } 94}