POJ2676 Sudoku

程序设计与算法(二)期末考试之06:Sudoku 描述 Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The other cells are empty. The goal is to fill the empty cel 阅读详情

原题链接:http://poj.org/problem?id=2676

Sudoku

Description

Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The other cells are empty. The goal is to fill the empty cells with decimal digits from 1 to 9, one digit per cell, in such way that in each row, in each column and in each marked 3x3 subsquare, all the digits from 1 to 9 to appear. Write a program to solve a given Sudoku-task.

Input

The input data will start with the number of the test cases. For each test case, 9 lines follow, corresponding to the rows of the table. On each line a string of exactly 9 decimal digits is given, corresponding to the cells in this line. If a cell is empty it is represented by 0.

Output

For each test case your program should print the solution in the same format as the input data. The empty cells have to be filled according to the rules. If solutions is not unique, then the program may print any one of them.

Sample Input

1
103000509
002109400
000704000
300502006
060000050
700803004
000401000
009205800
804000107

Sample Output

143628579
572139468
986754231
391542786
468917352
725863914
237481695
619275843
854396127

题解

我们开三个数组,记录在所有行,所有列,所有 3×3 3 × 3 矩阵里数字 1→9 1 → 9 是否出现过,这样,我们就可以很方便的爆搜了。

记录行和列很好做,但是 3×3 3 × 3 的矩阵不是很好做,我们可以科学计算,当然还可以打表。。。

赠送表一个:

int pos[10][10]={0,0,0,0,0,0,0,0,0,0,
         0,1,1,1,2,2,2,3,3,3,
         0,1,1,1,2,2,2,3,3,3,
         0,1,1,1,2,2,2,3,3,3,
         0,4,4,4,5,5,5,6,6,6,
         0,4,4,4,5,5,5,6,6,6,
         0,4,4,4,5,5,5,6,6,6,
         0,7,7,7,8,8,8,9,9,9,
         0,7,7,7,8,8,8,9,9,9,
         0,7,7,7,8,8,8,9,9,9,};
代码
#include<cstdio>
#include<cstring>
using namespace std;
bool heng[10][10],zong[10][10],squa[10][10];
int pos[10][10]={0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,3,0,1,1,1,2,2,2,3,3,3,0,1,1,1,2,2,2,3,3,3,0,4,4,4,5,5,5,6,6,6,0,4,4,4,5,5,5,6,6,6,0,4,4,4,5,5,5,6,6,6,0,7,7,7,8,8,8,9,9,9,0,7,7,7,8,8,8,9,9,9,0,7,7,7,8,8,8,9,9,9,};
int sq[10][10];
void in()
{
    memset(heng,0,sizeof(heng));
    memset(zong,0,sizeof(zong));
    memset(squa,0,sizeof(squa));
    char ch[10];int x;
    for(int i=1;i<=9;++i)
    {
        scanf("%s",ch);
        for(int j=0;j<9;++j)
        {
            x=ch[j]-'0';
            sq[i][j+1]=x;
            heng[i][x]=1;
            zong[j+1][x]=1;
            squa[pos[i][j+1]][x]=1;
        }
    }
}
bool dfs(int x,int y)
{
    if(x==10)return 1;
    bool flag;
    if(sq[x][y])
    {
        if(y==9)flag=dfs(x+1,1);
        else flag=dfs(x,y+1);
        if(flag)return 1;
        else return 0;
    }
    else
    {
        for(int i=1;i<=9;++i)
        {
            if(!heng[x][i]&&!zong[y][i]&&!squa[pos[x][y]][i])
            {
                sq[x][y]=i;
                heng[x][i]=1;
                zong[y][i]=1;
                squa[pos[x][y]][i]=1;
                if(y==9)flag=dfs(x+1,1);
                else flag=dfs(x,y+1);
                if(!flag)
                {
                    sq[x][y]=0;
                    heng[x][i]=0;
                    zong[y][i]=0;
                    squa[pos[x][y]][i]=0;
                }
                else return 1;
            }
        }
    }
    return 0;
}
void ac()
{
    dfs(1,1);
    for(int i=1;i<=9;++i)
    {
        for(int j=1;j<=9;++j)
        printf("%d",sq[i][j]);
        putchar(10);
    }
}
int main()
{
    int T;
    scanf("%d",&T);
    for(int i=1;i<=T;++i)
    in(),ac();
    return 0;
}
afe模拟前端的重要性_高性能模拟前端信号链解决方案如何助力医疗超声系统发展... 1942年,奥地利TDussik使用A型超声成像系统穿透性探测颅脑,并于1949年获得头部的超声图像,此举昭示超声系统进入到医疗领域。直到如今,超声系统作为用于人体内部的无创可视化技术,被广泛用于医疗领域。最近一份报告称到2022年,中国医疗超声诊断仪器行业的市场规模预计将达到15.8亿美元,保持6%左右的年均增长率。高性能模拟信号链前端是超声设备的关键组成部分,作为高性能模拟技术主要的提供商AD... 阅读详情

相关推荐

保姆级拆解:HP 1312NF/CM1415打印机进纸离合器清洁与更换全记录(附B站/油管视频指路)

本文详细记录了HP 1312NF打印机进纸离合器故障的诊断与修复全过程,包括故障判断、工具准备、拆解步骤、清洁更换技巧及预防措施。特别针对离合器内部海绵老化粘连问题,提供了电工胶布和硬纸片两种实用替代方案,并附有B站/油管视频指路,帮助用户轻松完成打印机维修。

weixin_31102231的博客 376

POJ 2676 Sudoku 数独(枚举dfs)

Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The othe...

点点滴滴 361

在 Mac OS 上编译 WebRTC 教程

在 Mac OS 上编译 WebRTC 教程

iShare_Carlos的博客 1249

【详解】Sudoku POJ - 2676(经典问题 DFS 重复剪枝)⭐⭐⭐

Sudoku POJ - 2676 Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits fr...

Suprit's blog 786

Unity 接入HybridCLR的点点滴滴,亲测三平台(PC、Android、WebGL)妥妥的。-问题分享

一入热更深似海啊,没有热更是真恼火啊,干啥啥不方便,动不动就得重新发包;说实在的,也是工作之余研究这个,在原有框架基础上接入这个热更,既要保持原有功能,还要支持热更,实实在在、断断续续搞了这么久,终于是接入并测通了,这一路是坎坎坷坷,下面把走过的弯弯绕绕记录下,希望对后来想接入的小伙伴有帮助吧。

GarFe的博客 1万+

Python爬虫实战:5分钟抓取东方财富股票数据并保存为CSV

在投资分析与量化研究的日常工作中,获取结构化、可用的金融数据往往是第一步。对于个人投资者和量化入门者而言,如何高效获取A股全市场行情,常常面临网页动态加载、反爬机制与数据整理繁琐等挑战。本文从数据采集的基础概念出发,介绍如何利用Python这一通用编程语言,通过requests库请求财经网站公开的HTTP接口,获取返回的JSON数据,再借助pandas进行字段映射、数据清洗与表格化处理。这种方式相比传统页面解析具有响应快、结构稳定、易于批量操作的显著优势,尤其适合构建个人股票数据池、验证选股策略或进行市场情

weixin_33146151的博客 251

POJ-2676 Sudoku(简单数独-dfs深搜)

Sudoku Time Limit: 2000MS Memory Limit: 65536K 题目链接 Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In s...

孤风的博客 797

littlefs系列:wear leveling

wear leveling的功能是通过block alloctor实现的。littlefs通过两个方法实现磨损均衡: 1) 检测和恢复bad blocks 2)通过dynamic blocks均衡磨损 检测和恢复bad blocks和block alloctor的关系并不紧密,主要依靠文件系统本身来检测坏块并标记。在littlefs中,检测坏块主要是通过写后回读并比较的方式实现的,如果数据不一致则说明是一个坏块。一旦检测到了坏块就要进行恢复。 如果是写入错误,因为数据才RAM中还有备份,因此需.

nstcl的博客 2570

Sudoku POJ - 2676 题解

原题 Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The other cells are empty. The goal is to fill the empty cell

qq_45750017的博客 967

别再让 AI 瞎写 SAP 代码了!这套 Claude Code Skill 的验证机制才是关键

本文深入解析了专为SAP CAP开发设计的AI辅助工具sap-cap-capire的技术架构。该工具采用四层设计:协议层集成MCP和LSP实现实时模型访问与语法检查;智能层通过4个专业化Agent(数据建模、服务开发等)分工协作;验证层确保代码质量;知识层存储文档模板。这种工程化设计解决了通用AI在CAP开发中面临的上下文不足、专业性缺失和代码质量保证等核心问题,通过本地化服务和实时反馈机制显著提升了开发效率。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 882

军品研制过程-转阶段

介绍军品转阶段评审

Abel的博客 2万+

POJ2676Sudoku题解

定义三个数组判断i列是否出现j,i行是否出现j,第i个宫格是否出现j,依次枚举每一位的9种可能。根据上述三种数组来判断当前状态的合法性。

weixin_42178241的博客 218

使用Simulink设计并实现一个可调谐的二阶IIR陷波滤波器,实时去除音频中的工频噪声

《基于Simulink的音频陷波滤波器设计与实现》摘要:本文详细介绍了使用Simulink设计陷波滤波器去除音频工频噪声(如50Hz)的方法。核心内容包括:1)二阶IIR陷波滤波器的原理与传递函数;2)Simulink实现步骤(音频系统搭建、滤波器设计、频率跟踪);3)性能分析(频谱对比、时域波形、听觉测试)。通过精准消除特定频率干扰,同时保留语音信号(200Hz-4kHz),有效提升信噪比(>20dB)。文章还探讨了多陷波级联、自适应算法等高级技巧,为音频处理、语音通信等应用提供实用解决方案。

amy_mhd的博客 156

【POJ 2676】 Sudoku

【题目链接】 http://poj.org/problem?id=2676 【算法】 深度优先搜索 【代码】 #include <algorithm> #include <bitset> #include <cctype> #include &lt...

93

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

POJ2676 Sudoku【DFS】

Sudoku Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 28548 Accepted: 13016 Special Judge Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided t...

海岛Blog 789

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

【POJ2676】Sudoku

本题传送门 本题知识点:深度优先搜索 + 回溯 问题就是要让我们解决一个数独问题。如果你懂得怎么玩数独的话,那就很自然想到用暴力搜索去做题。(比如我就不会,所以先WA了一发quq) 数独符合三个条件 同行里只有 1 ~ 9 这9个数字 同列里只有 1 ~ 9 这9个数字 在这9x9的方阵里有9个3x3的小方阵,每个小方阵里的9个数也只能是 1 ~ 9 注意,这每行每列每小方阵的9个数...

LT4585的博客 335

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

poj2676 Sudoku

Sudoku Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17953   Accepted: 8688   Special Judge Description Sudoku is a very simple task. A square table with

keshuqi的博客 427

Sudoku POJ-2676

Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The oth...

。。。的博客 305

POJ 2676 Sudoku

Sudoku Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 11054   Accepted: 5493   Special Judge Description Sudoku is a very simple task. A square table with 9

ACM2272902662的专栏 601

poj2676Sudoku

虽然做了两次了,但还是没有一遍完整的把代码敲下来,可能深搜用的还不娴熟,好多细节没有考虑到,遇到这种;类似的问题一筹莫展,还是自己比较渣,现在是一个瓶颈把,提高比较慢(强行安慰自己......)

W_904038290的博客 360

POJ 2676, Sudoku

Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5414Accepted: 2567Special Judge DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smalle...

weixin_34129696的博客 247

poj2676 Sudoku 数独

Language: Default Sudoku Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17986   Accepted: 8707   Special Judge Description Sudoku is a very simple tas

相思作坊半世离殇的博客 2427

【POJ 2676】Sudoku数独(DFS)

思路:DFS遍历解数独,很有意思的题目,由于行、列、每一个3*3小方格都不能重复,故需要三个数组row,col,dig来标记某1~9数字是否出现。DFS遍历,具体思路见注释。

Chen_yuazzy的博客 1557

Poj 2676 Sudoku

Sudoku Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16554   Accepted: 8075   Special Judge Description Sudoku is a very simple task. A square table with

曾经沧海难为水,除却巫山不是云 357

【POJ 2676】Sudoku

【POJ 7676】Sudoku又是一个水数据的搜索……不过还是剪枝做了做 剪枝大法好啊!好多几百ms的 剪出来个0ms 顿感欣慰不过看discuss 3074 Sudoku数据更强大 傻傻的去做了 最后T的实在不行的时候看到discuss说用dance links。。。呵呵了= = 只在当初听说xiao爷学了一阵子。。我还是慢慢搞吧= =有兴趣的可以去看看回归此题。。我是存了三个数组分别标记行中哪

ACMer' 1042
上一篇: [Tarjan四连]Tarjan缩点
下一篇: [NOIp2017 TG Day2 T2] 宝藏
ShadyPi
博客等级 码龄9年 1万+粉丝 637原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ShadyPi

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值