USACO section 1.5 Checker Challenge(dfs深搜)

USACO section 3.4 Closed Fences(计算几何+叉积+二分) Closed Fences A closed fence in the plane is a set of non-crossing, connected line segments with N corners (3 i, yi}, i in (1..N). Every pair of adjacent vertices defines a side of the fence. 阅读详情

Checker Challenge

Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from southeast to northwest and southwest to northeast and include all diagonals, not just the major two.)

          Column
    1   2   3   4   5   6
  -------------------------
1 |   | O |   |   |   |   |
  -------------------------
2 |   |   |   | O |   |   |
  -------------------------
3 |   |   |   |   |   | O |
  -------------------------
4 | O |   |   |   |   |   |
  -------------------------
5 |   |   | O |   |   |   |
  -------------------------
6 |   |   |   |   | O |   |
  -------------------------

The solution shown above is described by the sequence 2 4 6 1 3 5, which gives the column positions of the checkers for each row from 1 to 6:

ROW123456
COLUMN246135

This is one solution to the checker challenge. Write a program that finds all unique solution sequences to the Checker Challenge (with ever growing values of N). Print the solutions using the column notation described above. Print the the first three solutions in numerical order, as if the checker positions form the digits of a large number, and then a line with the total number of solutions.

Special note: the larger values of N require your program to be especially efficient. Do not precalculate the value and print it (or even find a formula for it); that's cheating. Work on your program until it can solve the problem properly. If you insist on cheating, your login to the USACO training pages will be removed and you will be disqualified from all USACO competitions. YOU HAVE BEEN WARNED.

TIME LIMIT: 1 CPU second

PROGRAM NAME: checker

INPUT FORMAT

A single line that contains a single integer N (6 <= N <= 13) that is the dimension of the N x N checkerboard.

SAMPLE INPUT (file checker.in)

6

OUTPUT FORMAT

The first three lines show the first three solutions found, presented as N numbers with a single space between them. The fourth line shows the total number of solutions found.

SAMPLE OUTPUT (file checker.out)

2 4 6 1 3 5
3 6 2 5 1 4
4 1 5 2 6 3
4

HINTS (use them carefully!)

忘了说了,看了奶牛网的分析,忽然想起了,这八皇后问题是对称性的,只要求其一半×2就是结果了,也就是说着程序还可以优化

 

/*
ID:nealgav1
PROG:checker
LANG:C++
*/
#include<cstdio>
#include<cstring>
#define N 42
bool l[42],r[42],t[42];
int m;
int shu[15];
int ans;
void dfs(int n)
{
  if(n<=m)
  {
    for(int i=1;i<=m;i++)
    {
      if(!l[13+i]&&!r[13+i+n]&&!t[13+i-n])//列+两对角 只要三值不一,不冲突皆可
      {
        l[13+i]=1;r[13+i+n]=1;t[13+i-n]=1;
        shu[n]=i;dfs(n+1);
        l[13+i]=0;r[13+i+n]=0;t[13+i-n]=0;
      }
    }
  }
  else
  {
    ans++;
    if(ans<=3)
    {
      for(int i=1;i<m;i++)printf("%d ",shu[i]);
      printf("%d\n",shu[m]);
    }
    if(ans>14200){ans=73712;return;}//12个时是14200,13个时是73712所以就减一下,
  }                                 //时间上能省上一点。不过是鸡肋
}
int main()
{
  freopen("checker.in","r",stdin);
  freopen("checker.out","w",stdout);
  scanf("%d",&m);
  ans=0;
  memset(l,0,sizeof(l));memset(r,0,sizeof(r));memset(t,0,sizeof(t));
  dfs(1);
  printf("%d\n",ans);
}


 

 
 
 
 
 
 
 
 
 
 
USER: Neal Gavin Gavin [nealgav1]
TASK: checker
LANG: C++

Compiling...
Compile: OK

Executing...
   Test 1: TEST OK [0.000 secs, 3344 KB]
   Test 2: TEST OK [0.000 secs, 3344 KB]
   Test 3: TEST OK [0.000 secs, 3344 KB]
   Test 4: TEST OK [0.000 secs, 3344 KB]
   Test 5: TEST OK [0.000 secs, 3344 KB]
   Test 6: TEST OK [0.022 secs, 3344 KB]
   Test 7: TEST OK [0.130 secs, 3344 KB]
   Test 8: TEST OK [0.713 secs, 3344 KB]

All tests OK.

YOUR PROGRAM ('checker') WORKED FIRST TIME! That's fantastic -- and a rare thing. Please accept these special automated congratulations.

Here are the test data inputs:

------- test 1 ----
6
------- test 2 ----
7
------- test 3 ----
8
------- test 4 ----
9
------- test 5 ----
10
------- test 6 ----
11
------- test 7 ----
12
------- test 8 ----
13
Keep up the good work!


Thanks for your submission!

 

 

Checker ChallengeRuss Cox

We use a recursive complete search to simply test all boards. The search proceeds by trying to put one checker in each row. We keep track of which columns and diagonals already have checkers on them in the "col", "updiag", and "downdiag" arrays.

Since we generate solutions in increasing order, we record the first 3 in the "sol" array.

Symmetry enables us to count the first half of the solutions double and avoid calculating the second half. An exception happens when N is odd; the odd row needs to be counted once.

The N>6 lines get the program out of trouble when N==6, because at that point, the first 3 solutions include one of the symmetric answers.

Since we number rows from 0 to N-1 rather than 1 to N, we need to add 1 to each digit as we print (in "printsol").

/*
TASK: checker
LANG: C
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#define MAXN 16

int n;
int nsol, nprinted;
char row[MAXN];
FILE *fout;

void
solution() {
    int i;
    for(i=0; i<n; i++) {
	if(i != 0) fprintf(fout, " ");
	fprintf(fout, "%d", row[i]+1);
    }
    fprintf(fout, "\n");
}

/* Keep track of whether there is a checker on each column, and diagonal. */
char col[MAXN];		/* (i, j) -> j */
char updiag[2*MAXN];	/* (i, j) -> i+j */
char downdiag[2*MAXN];	/* (i, j) -> i-j + N */

/*
 * Calculate number of ways to place checkers
 * on each row of the board starting at row i and going to row n.
 */
void
nway(i, lim) {
    int j;

    if(i == n) {
	nsol++;
	if (n > 6 && row[0] < n/2) nsol++;
	if (nprinted++ < 3) solution();
	return;
    }

    for(j=0; j<lim; j++){
	if(!col[j] && !updiag[i+j] && !downdiag[i-j+MAXN]){
	    row[i] = j;

	    col[j]++;
	    updiag[i+j]++;
	    downdiag[i-j+MAXN]++;

	    nway(i+1,n);

	    col[j]--;
	    updiag[i+j]--;
	    downdiag[i-j+MAXN]--;
	}
    }
}

main(void) {
    FILE *fin = fopen("checker.in", "r");
    fout = fopen("checker.out", "w");
    fscanf(fin, "%d", &n);
    nway(0, n>6?(n+1)/2:n);
    fprintf(fout, "%d\n", nsol);
    exit (0);
}

Clever Michael Rybak's Solution

The Ukraine's Michael Rybak removed the 'this row is used' search (which obviously at the end of the recursion is a lot of wasted iterating) and replaced it with a list of valid rows to use (which presumably has but a single element at the end of the recursion). His program runs almost 4x faster then N==13.

Program Checker;
   Var diagPLUS: Array[2..30] Of Boolean;
       diagMINUS: Array[-15..15] Of Boolean;
       sol: Array[1..15] Of ShortInt;
       i,n,found: Longint;
       stop: Boolean;
       next,prev: Array[0..16] Of ShortInt;
       sy: ShortInt;

Procedure Search0(y:ShortInt);
    Var x,i:ShortInt;
Begin
    If stop Then Exit;
    If y=n+1 Then Begin
        Inc(found);
        If found<4 Then Begin
            For i:=1 To n-1 Do
                Write(sol[i],' ');
            Writeln(sol[n]);
        End Else
        stop:=True;
        Exit;
    End;
    If sol[y]<>0 Then Begin
        Search0(y+1);
        Exit;
    End;
    x:=next[0];
    While x<=n Do Begin
        If Not ((diagPLUS[x+y]) Or (diagMINUS[x-y])) Then Begin
            sol[y]:=x;
            diagPLUS[x+y]:=True;
            diagMINUS[x-y]:=True;
            next[prev[x]]:=next[x];
	    prev[next[x]]:=prev[x];
            Search0(y+1);
            diagPLUS[x+y]:=False;
            diagMINUS[x-y]:=False;
            next[prev[x]]:=x; prev[next[x]]:=x;
        End;
        x:=next[x];
    End;
    sol[y]:=0; 
End;

Procedure Search;
    Var x:ShortInt;
Begin
    If sy=n+1 Then Begin
        Inc(found);
        Exit;
    End;
    If sol[sy]<>0 Then Begin
        Inc(sy);
        Search;
        Dec(sy);
        Exit;
    End; 
    x:=next[0];
    While x<=n Do Begin
        If Not ((diagPLUS[x+sy]) Or (diagMINUS[x-sy])) Then Begin
            sol[sy]:=x;
            diagPLUS[x+sy]:=True;
            diagMINUS[x-sy]:=True;
            next[prev[x]]:=next[x];
            prev[next[x]]:=prev[x];
            Inc(sy);
            Search;
            Dec(sy);
            diagPLUS[x+sy]:=False;
            diagMINUS[x-sy]:=False;
            next[prev[x]]:=x;
            prev[next[x]]:=x;
        End;
        x:=next[x];
    End;
    sol[sy]:=0;
End;

Procedure Search2(miny:Longint);
    Var x,y,i:ShortInt;
         curf:Longint;
Begin
    x:=n Div 2+1;
    For y:=miny To n Div 2 Do
	If Not (diagPLUS[x+y] Or diagMINUS[x-y]) Then Begin
	    curf:=found;
	    sol[y]:=x;
            diagPLUS[x+y]:=True;
            diagMINUS[x-y]:=True;
            next[prev[x]]:=next[x]; prev[next[x]]:=prev[x];
            sy:=1;
            Search;
            If y>miny Then
                found:=found+(found-curf);
            sol[y]:=0;
            diagPLUS[x+y]:=False;
            diagMINUS[x-y]:=False;
            next[prev[x]]:=x; prev[next[x]]:=x;
	End;
End;

Procedure Search1;
    Var x,y,i:ShortInt;
Begin
    y:=n Div 2+1;
    For x:=1 To n Div 2 Do Begin
        sol[y]:=x;
        diagPLUS[x+y]:=True;
        diagMINUS[x-y]:=True;
        next[prev[x]]:=next[x]; prev[next[x]]:=prev[x];
        Search2(x);
        diagPLUS[x+y]:=False;
        diagMINUS[x-y]:=False;
        next[prev[x]]:=x; prev[next[x]]:=x;
    End;
    sol[y]:=0; 
    found:=found*4;
    x:=n Div 2+1;
    sol[y]:=x;
    diagPLUS[x+y]:=True;
    diagMINUS[x-y]:=True;
    next[prev[x]]:=next[x]; prev[next[x]]:=prev[x];
    sy:=1;
    Search;
End;

Begin
    Assign(Input,'checker.in'); Reset(Input);
    Assign(Output,'checker.out'); Rewrite(Output);
    Read(n);
    found:=0;
    FillChar(diagPLUS,SizeOf(diagPLUS),False);
    FillChar(diagMINUS,SizeOf(diagMINUS),False);
    FillChar(sol,SizeOf(sol),0);
    For i:=0 To n+1 Do Begin
        prev[i]:=i-1;
        next[i]:=i+1;
    End;
    If n Mod 2=0 Then Begin
        stop:=False;
        Search0(1);
        sy:=1;
        found:=0;
        Search;
    End Else Begin
        stop:=False;
        Search0(1);
        found:=0;
        Search1;
    End;
        Writeln(found);
        Close(Output);
End.

Clever Romanian Solution

Submitted by several from Romania, this solution uses bitmasks instead of a list to speed searching:

#include <stdio.h>
#include <stdlib.h>
#include <fstream.h>
#define MAX_BOARDSIZE 16
typedef unsigned long SOLUTIONTYPE;
#define MIN_BOARDSIZE 6
SOLUTIONTYPE g_numsolutions = 0;

void Nqueen(int board_size) {
    int aQueenBitRes[MAX_BOARDSIZE];	 /* results */
    int aQueenBitCol[MAX_BOARDSIZE];	 /* marks used columns */
    int aQueenBitPosDiag[MAX_BOARDSIZE]; /* marks used "positive diagonals" */
    int aQueenBitNegDiag[MAX_BOARDSIZE]; /* marks used "negative diagonals" */
    int aStack[MAX_BOARDSIZE + 2];	 /* a stack instead of recursion */
    int *pnStack;

    int numrows = 0; 		/* numrows redundant - could use stack */
    unsigned int lsb;		/* least significant bit */
    unsigned int bitfield;	/* set bits denote possible queen positions */
    int i;
    int odd = board_size & 1; 	/* 1 if board_size odd */
    int board_m1 = board_size - 1; 	/* board size - 1 */
    int mask = (1 << board_size) - 1; 	/* N bit mask of all 1's */

    aStack[0] = -1; 		/* sentinel signifies end of stack */
    for (i = 0; i < (1 + odd); ++i) {
	bitfield = 0;
	if (0 == i) {
	    int half = board_size>>1; /* divide by two */
	    bitfield = (1 << half) - 1;
	    pnStack = aStack + 1; /* stack pointer */
	    aQueenBitRes[0] = 0;
	    aQueenBitCol[0] = aQueenBitPosDiag[0] = aQueenBitNegDiag[0] = 0;
	} else {
	    bitfield = 1 << (board_size >> 1);
	    numrows = 1; /* prob. already 0 */

	    aQueenBitRes[0] = bitfield;
	    aQueenBitCol[0] = aQueenBitPosDiag[0] = aQueenBitNegDiag[0] = 0;
	    aQueenBitCol[1] = bitfield;

	    aQueenBitNegDiag[1] = (bitfield >> 1);
	    aQueenBitPosDiag[1] = (bitfield << 1);
	    pnStack = aStack + 1; /* stack pointer */
	    *pnStack++ = 0; /* row done -- only 1 element & we've done it */
	    bitfield = (bitfield - 1) >> 1;
			/* bitfield -1 is all 1's to the left of the single 1 */
	}
	for (;;) {
	    lsb = -((signed)bitfield) & bitfield;
		/* this assumes a 2's complement architecture */
	    if (0 == bitfield) {
		bitfield = *--pnStack;	/* get prev. bitfield from stack */
		if (pnStack == aStack)	/* if sentinel hit.... */
		    break;
		--numrows;
		continue;
	    }
	    bitfield &= ~lsb; /* bit off -> don't try it again */
	    aQueenBitRes[numrows] = lsb; /* save the result */
	    if (numrows < board_m1) {	/* more rows to process? */
		int n = numrows++;
		aQueenBitCol[numrows] = aQueenBitCol[n] | lsb;
		aQueenBitNegDiag[numrows] = (aQueenBitNegDiag[n] | lsb) >> 1;
		aQueenBitPosDiag[numrows] = (aQueenBitPosDiag[n] | lsb) << 1;
		*pnStack++ = bitfield;
		bitfield = mask & ~(aQueenBitCol[numrows] |
			aQueenBitNegDiag[numrows] | aQueenBitPosDiag[numrows]);
		continue;
	    } else {
		++g_numsolutions;
		bitfield = *--pnStack;
		--numrows;
		continue;
	   }
	}
    }
    g_numsolutions *= 2;
}

int main(int argc, char** argv) {
    ifstream f("checker.in");
    ofstream g("checker.out");
    long boardsize,s[20],ok,k,i,sol=0;
    f>>boardsize;
    Nqueen (boardsize);
    k=1;
    s[k]=0;
    while (k>0) {
	ok=0;
	while(s[k]<boardsize && !ok) {
	    ok=1;
	    s[k]++;
	    for(i=1;i<k;i++)
		if(s[i]==s[k] || abs(s[k]-s[i])==abs(k-i))
		    ok=0;
	}
	if(sol!=3)
	    if(!ok)
		k--;
	    else
		if(k==boardsize) {
		    for(i=1;i<boardsize;i++) {
			for(int j=1;j<=boardsize;j++)
			    if(s[i]==j) g<<j<<" ";
		    }
		    for(i=1;i<=boardsize;i++)
			if(s[boardsize]==i) g<<i;
		    g<<"\n";
		    sol++;
		} else {
		    k++;
		    s[k]=0;
		} else break;
    }
    g<<g_numsolutions<<"\n";
    f.close();
    g.close();
    return 0;
}


 

ANSYS Maxwell:创建即用型 3D 轴向磁通电机模型 Magnet Length” 是磁体的径向长度。“Magnet Thickness” 是磁体的轴向长度。为了对 AFM 进行更详细的分析,用户需要在 ANSYS Maxwell 中运行 3D FEA 分析。对于 2D 模型,它们类似于 MotorCAD 中的模型,后者对等效的直线电机进行建模。单击“确定”后,将创建一个 3D Maxwell 模型。“长度”是转子铁的轴向长度。然后需要定义定子的“磁芯”尺寸和材料。“长度”是定子铁芯的轴向长度。“转子”# 的极数必须与“定子”中定义的磁极相同。 阅读详情

相关推荐

NIST随机性测试实战:从理论公式到结果解读

本文详细解析了NIST随机性测试的实战应用,从基础测试到高级测试,涵盖频数测试、块频数测试、游程测试等核心方法。通过实际案例和参数设置经验,帮助读者理解如何解读测试结果并排查常见问题,提升随机数生成质量。文章还分享了自动化测试流程和硬件RNG特殊处理技巧,适合密码学和区块链开发者参考。

weixin_29323365的博客 314

USACO Section 1.5 Checker Challenge

题意: N皇后问题  输出  字典序最小的3种解法 和 解的数量 思路: dfs去放皇后判断和前面的皇后是否冲突 题目时间卡的超级很近!!  简单的搜索一定跪  能剪的地方要拼命剪枝!! 列举我的剪枝: 1.直接按字典序搜索  最先搜到的3个解保证字典序最小  直接输出 2.通过上几行皇后的放法  求出现在这行有几个位置能放皇后  之后进行搜索(这是关键!!  千万不要先搜位

House 904

Android wifi源码分析(二) Wifi关闭流程

接着上一篇,这篇说一下Wifi的关闭流程。 由上一篇可以知道,framework层提供的wifi开关接口都是**setWifiEnabled**,只是参数不同而已。*true*表示开启wifi、*false*表示关闭wifi。

奋斗的菜鸟ing 3297

【题解】洛谷P1219[USACO Training Section 1.5] 八皇后 dfs

题目链接 题目描述 检查一个如下的 6×66\times66×6 的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行、每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子。 上面的布局可以用序列 222 444 666 111 333 555 来描述,第 iii 个数字表示在第 iii 行的相应位置有一个棋子,如下: 行号 111 222 333 444 555 666 列号 ...

翻过这座山,他们就会听到你的故事 498

WordPress主题开发实战:从零开始手把手教你创建自定义主题(含常用函数大全)

本文是一份WordPress主题开发实战指南,从零开始手把手教你创建自定义主题。内容涵盖主题核心文件结构、模板层级与循环机制、函数与钩子的运用,并附有详细的常用函数大全,帮助开发者彻底掌握主题开发的核心技能,实现从使用者到创造者的转变。

weixin_27943395的博客 256

【汽车主动降噪】【ANC算法优化】基于深度学习的汽车主动噪声控制技术研究及Matlab实现

本文探讨了基于深度学习的汽车主动降噪(ANC)算法优化方案。针对传统FXLMS算法在应对复杂、非线性车内噪声时的局限性,文章详细解析了如何利用神经网络作为非线性建模器、深度滤波器或智能步长调节器来增强ANC系统性能,并提供了完整的Matlab仿真实战流程,展示了深度学习在提升降噪效果和收敛速度方面的潜力。

seed的博客 540

usaco Section 1.5 Checker Challenge 最慢0.162秒0.0+n皇后问题位运算版(C语言)

今天做USACO做到Section 1.5的Checker Challenge 直接dfs之后的结果是,超时。。百度查查才想起来就是八皇后问题。有人讲怎么利用对称性怎么怎么优化,我都懒得看~直到看到这个http://www.matrix67.com/blog/archives/266matrix67(是谁?貌似很牛)写的位运算教程,一上来就有个“n皇后问题位运算版”,被人称作最

. 1038

英飞凌TC3xx实战:PWM中点触发ADC采集+DMA自动搬运完整配置流程(基于ILLD库)

本文详细介绍了在英飞凌TC3xx系列微控制器上使用ILLD库实现PWM中点触发ADC采集并通过DMA自动搬运数据的完整配置流程。该方案适用于电机控制、电源管理等需要高精度定时采集的场景,通过GTM生成PWM信号、ADC采集和DMA传输实现全硬件自动化流程,显著提升系统效率。

weixin_42536058的博客 534

USACO section 1.5.4 Checker Challenge

USACO section 1.5.4 Checker Challenge 1. 第一次做位运算的题,参考了这段经典代码(n皇后问题): void Queen(int row, int ld, int rd) { int pos, p; int...

dayong9372的博客 166

完整功能-《网络安全创新实践》:设计并实现一种基于Npcap的网络嗅探器(直接能运行cpp的MFC代码+实验报告)

《网络安全创新实践》:设计并实现一种基于Npcap的网络嗅探器。(直接能跑的MFC)监听所有数据包,以及监听指定IP地址的数据包;(2)能够显示完整的IP数据包首部信息,例如:版本、首部长度、数据包长度、数据包类型(协议字段)、TTL、源IP地址、目的IP地址等;(3)能够显示完整的TCP报文段信息,例如:源端口、目的端口、序号、确认号、数据部分等;(4)能够自动检测SQL注入攻击等Web攻击行为;(5)能够将监听到的数据包信息保存到文件中,以及从文件中读取并显示数据包信息;(6)具有图形化操作界面。

weixin_46531010的博客 660

大数据工程中的数据血缘分析工具比较

数据血缘(Data Lineage)是大数据治理中的核心组成部分,它描述了数据从源头到目标的完整流动路径。系统介绍数据血缘的核心概念和技术原理比较主流开源和商业数据血缘工具的功能特点提供数据血缘分析的实践指南和选型建议本文首先介绍数据血缘的基本概念,然后深入分析其技术原理和实现方法,接着比较主流工具的特点,最后通过实际案例展示应用场景。数据血缘(Data Lineage): 描述数据从源头到目标的完整流动路径,包括所有转换和处理步骤元数据(Metadata)

大数据洞察的博客 900

洛谷 [P1219 [USACO1.5]八皇后 Checker Challenge] {搜索|DFS} 奋斗的珂珂~

题目描述 一个如下的 6×6 的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行、每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子。 上面的布局可以用序列 2 4 6 1 3 5 来描述,第 i 个数字表示在第 i 行的相应位置有一个棋子,如下: 行号 1 2 3 4 5 6 列号 2 4 6 1 3 5 这只是棋子放置的一个解。请编一个程序找出所有棋子放置的解。 并把它们以上面的序列方法输出,解按字典顺序排列。 请输出前 3 个解。最后一行是解的总个数。 输入格式 一行一个正整数

cmk_chy的博客 410

RT-DETR改进策略【小目标改进】| Shape-NWD:融合改进,结合Shape-IoU和NWD 更好地适应小目标特性

Bw−wgt2h−hgt2weight2Bweight2w−wgt​2h−hgt​2​其中weight2weight = 2weight2。

Limiiiing的博客 1544

USACO Section1.5 Checker Challenge

Checker Challenge Examine the 6x6 checkerboard below and note that the six checkersare arranged on the board so that one and only one is placed in eachrow and each column, and there is never more

338

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

USACO Section 1.5 Checker Challenge(八皇后问题)

Checker Challenge Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is nev...

angtongyou1893的博客 166

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

USACO section 3.1 Contact(AC自动机)

Contact IOI'98 The cows have developed a new interest in scanning the universe outside their farm with radiotelescopes. Recently, they noticed a very curious microwave pulsing emission sent right f

nealgavin的专栏 9384

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

USCAO section 1.3 Calf Flac

Calf Flac It is said that if you give an infinite number of cows an infinite number of heavy-duty laptops (with very large keys), that they will ultimately produce all the world's great palindromes

nealgavin的专栏 6656

USACO section 2.3 Longest Prefix(dp)

Longest Prefix IOI'96 The structure of some biological objects is represented by the sequence of their constituents, where each part is denote by an uppercase letter. Biologists are interested in

nealgavin的专栏 1486

USACO section 2.4 Cow Tours(并查集+最短路)

Cow Tours Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pasture

nealgavin的专栏 1405

USACO section3.1 Shaping Regions(漂浮法)

Shaping Regions N opaque rectangles (1 <= N <= 1000) of various colors are placed on a white sheet of paper whose size is A wide by B long. The rectangles are put with their sides parallel to the s

nealgavin的专栏 1052

USACO section 2.2 Runaround Numbers

Runaround Numbers Runaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration: If you start

nealgavin的专栏 989

USACO section 3.1 Stamps(dp)

Stamps Given a set of N stamp values (e.g., {1 cent, 3 cents}) and an upper limit K to the number of stamps that can fit on an envelope, calculate the largest unbroken list of postages from 1 cent

nealgavin的专栏 980

USCAO section 4.1 Fence Loops(最短路,最小环,5级)

Fence Loops The fences that surround Farmer Brown's collection of pastures have gotten out of control. They are made up of straight segments from 1 through 200 feet long that join together only a

nealgavin的专栏 941

USACO section 1.5 Superprime Rib(深搜)

Superprime RibButchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by one, by FJ and the USDA. Farmer John

nealgavin的专栏 937
上一篇: USACO section 1.5 Superprime Rib(深搜)
下一篇: USACO section 2.1 Sorting a Three-Valued Sequence
剑不飞
博客等级 码龄15年 86粉丝 505原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值