1. 程式人生 > >welcome to 浩·C's blog

welcome to 浩·C's blog

#include <iostream>
using namespace std;

/*
思路:
       注意題中說的“好晶片比壞晶片多”,所以對於每個晶片,可以記錄其他行的晶片對該晶片的“投票”,
	   由於好晶片多,所以投票結果是r> w,則該晶片為好,否則為壞。
	   (強調是其它晶片對它檢測,而不是它對其他晶片檢測)
*/
int a[25][25],n;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			cin>>a[i][j];
		}
	}
	for(int j=1;j<=n;j++)
	{
		int r=0,w=0;
		for(int i=1;i<=n;i++)
		{
			if(a[i][j]==1)
				r++;
			else
				w++;
		}
		if(r>w)
			cout<<j<<" ";
	}
	return 0;
} 

相關推薦

welcome to ·C's blog

#include <iostream> using namespace std; /* 思路: 注意題中說的“好晶片比壞晶片多”,所以對於每個晶片,可以記錄其他行的晶片對該

Welcome to Smile-Huang 's Blog.】This Blog aims to share my experience with you. Please leave comments if you have any thoughts.

This Blog aims to share my experience with you. Please leave comments if you have any thoughts.

Welcome to Smile-Huang 's Blog.

#include<iostream> #include<string> #include<fstream> using namespace std; //字元數目為n的詞項k-gram數目為n+1-k //預定的閾值為0.1 #define threshold 0.1

Welcome to Feng.Chang's Blog

1、檢視當前登入使用者 [[email protected] ~]$ whatis w w                    (1)  - Show who is logged on

Welcome to WindowsCE's World.

    因為專案需要,準備學習 WinCE 了。以前一直在弄嵌入式 Linux,突然進入Windows平臺,還真不太適應,許多WinCE的概念與思維與Linux相去甚遠,更談不上 Linux 下開源給人的透明與暢快。     仗著自己在VC上還算“有點”小經

Hello, welcome to the little sheep blog

1、開始使用DataTables很簡單,只需要引入兩個檔案, 一個css樣式檔案和DataTables本身的指令碼檔案。在DataTables CDN上,可以使用下面這兩個檔案: css http://cdn.datatables.net/1.10.15/css/jquer

Welcome ! This is Guanpx's blog.

利用kmeans演算法進行非監督分類 1.聚類與kmeans 引例:2004美國普選布什51.52% 克里48.48% 實際上,如果加以妥善引導,那麼一有小部分人就會轉換立場,那麼如何找到這一小部分人以及如何在有限預算採取措施吸引他們呢?答案就是聚類(&l

Welcome to HAN Tingting's Techblog!

最近在新專案中引入了SASS來編寫樣式程式碼,心想既然用到了這種高階貨,就要用得巧用得妙,不能單純地只是把常用屬性定義成變數或定義重用的程式碼塊等等。因此在編寫樣式時,都要時刻提醒自己是不是可以巧用SASS來解決一些問題。 這次遇到的需求是,<ul>

Welcome to JRX2015U43's blog!

【英文題目】 A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S <

Welcome to yjjr's blog!

T1 yyy點餐 題意 給出長度為nnn的序列,求有所有不同的組合的代價總和(每種組合的代價為該組合內所有數之和) 對於全部資料,有1≤n≤1000000,0≤ai&lt;9982443531\

Welcome to oopos's Blog

/*最大子段和問題:對於一個序列: -6,9,8,-10,100,-99其中:最大子段和為:100 子段長度為:10*/#include <stdio.h>#include <stdlib.h>#define MAX 101int main(void){    int i,j,k,n,

Welcome to ray's blog home page

在Java中,一個物件在可以被使用之前必須要被正確地初始化,這一點是Java規範規定的。本文試圖對Java如何執行物件的初始化做一個詳細深入地介紹(與物件初始化相同,類在被載入之後也是需要初始化的,本文在最後也會對類的初始化進行介紹,相對於物件初始化來說,類的初始化要相對

Welcome to DaxinPai's Blog

在資料分析中,遇到統計問題的時候,基本可以按照下表來: (圖片來源自網上,出處不詳) 那麼首先我們需要判斷是否是正態分佈(Normal Distribution), 四種方法: 繪製資料的直方圖,看疊加線——這是一種粗略的方法,且不是硬性( ha

Password authencated key exchange based on lattice for C/S model&&Resistance to quantum computers

sed concise ech show real public 技術分享 rime 分享 Password authented key exchange based on lattice for C/S model l&& Resistance to qu

Quinn's blog ! I'm glad to be here!

數學推導 比例縮法填充,滿足最大邊填充,故此,首先找出相對於填充的最大邊 let fromW = from.width let fromH = from.height let toH = to

Welcome to my blog. I hope you can communicate with me.

以上程式碼實現了利用Js獲取裝置螢幕的寬度,並根據螢幕的寬度動態改變根元素html的font-siz屬性的作用。比如說,對於iphone6而言,螢幕尺寸為750,那麼在iPhone6下html的font-size為1px,所以1rem = 1px;對於iPhone5而言,螢幕尺寸為640,那麼在iPhone5

Deploying Facebox to AWS ECS @ Alex Pliutau's Blog

Currently I am building a product on top of face recognition functionality and I am using Facebox with go-sdk as it’s the easiest way to add

o means open. Simple CLI tool to open repository in browser. @ Alex Pliutau's Blog

Here is my small bash function! When you run it from the terminal it opens the GitHub/BitBucket/GitLab page in your browser for the git reposi

How to build Go plugin with data inside @ Alex Pliutau's Blog

Go 1.8 gives us a new tool for creating shared libraries, called plugins! This new plugin buildmode is currently only supported on Linux. But

Different ways to block Go runtime forever @ Alex Pliutau's Blog

The current design of Go’s runtime assumes that the programmer is responsible for detecting when to terminate a goroutine and when to terminat