time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is…
题目链接:http://codeforces.com/contest/721/problem/A A. One-dimensional Japanese Crossword time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently Adaltik discovered japanese crosswords. Japan…
A. One-dimensional Japanese Crossword time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a tabl…
B. Japanese Crosswords Strike Back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A one-dimensional Japanese crossword can be represented as a binary string of length x. An encoding of thi…
链接: https://vjudge.net/problem/CodeForces-721A 题意: Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is colored white or black. There are integers to the left…
题意:给定一行字符串,让你输出字符‘B'连续出现的次数. 析:直接扫一下就OK了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstrin…
http://codeforces.com/contest/851/problem/C 题意 - 给出 n 个五维空间的点 - 一个点a为 bad 的定义为 存在两点 b, c, 使的<ab, ac> 为锐角 - 分析 - 在二维平面内, 选取坐标轴原点为a点, 其余点数大于4时, 由鸽巢定理必定有至少两个点位于同一象限, 此时位于统一象限的点与原点夹角为锐角 - 在三维空间内, 选取坐标轴原点为a点, 其余点数大于8时, 同理存在锐角 - 推广, 5维空间内, 除原点外有大于(1<&l…
原题链接:http://codeforces.com/problemset/problem/850/A 题意:有n个五维空间内的点,如果其中三个点A,B,C,向量AB,AC的夹角不大于90°,则点A是“bad”的否则是“good”.题目让我们输出good的点. 思路:从2,3维空间超过5,7个点时不存在“good”的点,可以简单推知五维空间内,超过11个点时不存在“good”的点,那么点数小于11时暴力,大于11时输出0. 其实由于数据量小,直接暴力也是可行的. AC代码: #include<i…
题目链接 题意 给出一个11元组A和11元组B,给出n个11元方程,每个方程有一个日期,要让A变成B,问最少需要日期多少才可以变. 思路 因为日期满足单调性,所以可以二分答案.判断的时候就是高斯消元套模板,这个模板是要能对11取模的(因为说了数字在0到10之间). #include <bits/stdc++.h> using namespace std; const int MOD = 11; const int MAXN = 1011; struct Node { int num[11];…
A. One-dimensional Japanese Crossword 题目连接: http://codeforces.com/contest/721/problem/A Description Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is color…