ural 2063. Black and White
2063. Black and White
Memory limit: 64 MB
Input
Output
Sample
input | output |
---|---|
2 |
? 1 2 |
Notes
Problem Source: Ural Regional School Programming Contest 2015
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std; int n; int main()
{
ios::sync_with_stdio();
srand(time());
int m;
cin >> m;
for(int n = ; n <= m + ; n++)
{
for(int i = ; i <= n; i++)
for(int j = ; j < i; j++)
cout << "? " << j << ' ' << i << "\n";
int x = rand() % (n - ) + ;
cout << "! " << x << ' ' << x + << "\n";
cout.flush();
}
return ;
}
ural 2063. Black and White的更多相关文章
- ural 1243. Divorce of the Seven Dwarfs
1243. Divorce of the Seven Dwarfs Time limit: 1.0 secondMemory limit: 64 MB After the Snow White wit ...
- ural 1221. Malevich Strikes Back!
1221. Malevich Strikes Back! Time limit: 1.0 secondMemory limit: 64 MB After the greatest success of ...
- URAL 1297 Palindrome 后缀数组
D - Palindrome Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Subm ...
- URAL 1297 最长回文子串(后缀数组)
1297. Palindrome Time limit: 1.0 secondMemory limit: 64 MB The “U.S. Robots” HQ has just received a ...
- URAL - 1243 - Divorce of the Seven Dwarfs (大数取模)
1243. Divorce of the Seven Dwarfs Time limit: 1.0 second Memory limit: 64 MB After the Snow White wi ...
- Ural 1225. Flags 斐波那契DP
1225. Flags Time limit: 1.0 secondMemory limit: 64 MB On the Day of the Flag of Russia a shop-owner ...
- imshow() displays a white image for a grey image
Matlab expects images of type double to be in the 0..1 range and images that are uint8 in the 0..255 ...
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
- ural 2071. Juice Cocktails
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...
随机推荐
- NPOI基本操作XLS
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using Sys ...
- 困难的串(dfs)
困难的串 题意: 如果一个字符串包含两个相邻的重复子串,则称它是“容易的串”,其他串称为“困难的串”.例如, BB.ABCDABCD都是容易的串,而D.DC.ABDAD ...
- iPhone:4.7 5.5 4 3.5 对应的各个设备屏幕尺寸对应的像素及App上线信息
Shared App Information You can access these properties from the App Details page in the App Informat ...
- hdu 2057 A+B
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2057 For each test case,print the sum of A and B in h ...
- Jmeter 中使用非GUI启动进行压力测试
使用非 GUI 模式,即命令行模式运行 JMeter 测试脚本能够大大缩减所需要的系统资源.使用命令jmeter -n -t <testplan filename> -l <list ...
- MVC – 5.MVC设计模式和.NetMVC框架
MVC模式-设计模式 •控制器(Controller)- 负责转发请求,对请求进行处理. •视图 (View) - 界面设计人员进行图形界面设计. •模型 (Model)-业务逻辑.数据.验证规则.数 ...
- Netty网络编程之NIO概览与简单应用
>>关于NIO Java NIO即Java Non-blocking IO(Java非阻塞I/O),是Jdk1.4之后增加的一套操作I/O工具包,又被叫做Java New IO. (1)R ...
- Session 类
Session 类 Session 类可以使用户在浏览您的网站时,维持他们的状态并跟踪他们的行为. Session 类将每个用户的 session 信息序列化(serialize)后存储到到 coo ...
- web开发的步骤
前端知道是浏览器呈现的部分,相对于前端,后台你可以理解为服务器端专门处理.读取.存储数据库数据的部分. 因为网站是基于B\S架构,即浏览器---服务端架构,就程序来讲,可笼统划分为前端程序和服务器端程 ...
- 监听报错 TNS-00525: Insufficient privilege for operation 11gR2 + 连接报错ORA-12537: TNS:connection closed
1.TNS-00525: Insufficient privilege for operation Started with pid= Listening on: (DESCRIPTION=(ADDR ...