当前位置:网站首页>[summer daily question] Luogu p6336 [coci2007-2008 2] bijele
[summer daily question] Luogu p6336 [coci2007-2008 2] bijele
2022-07-29 07:28:00 【AC_ Dragon】
Topic link :P6336 [COCI2007-2008#2] BIJELE - Luogu | New ecology of computer science education (luogu.com.cn)
Background
Mirko A set of incomplete chess pieces was found in the attic .
Title Description
For the right set of chess pieces , It should contain :
- A king ;
- A queen ;
- Two cars ;
- Two elephants ;
- Two horses ;
- Eight soldiers .
Now, how many pieces are there in this set of incomplete pieces , Please figure out how to add or delete pieces to make a complete chessboard .
Input format
Enter six numbers in a row , It means the king in turn , Queen , vehicle , like , Horse , The number of soldiers . These figures are in $0\sim 10$ Between ( Include endpoints ).
Output format
Output six numbers in a row , It means the king in turn , Queen , vehicle , like , Horse , The number of soldiers to add or delete . Use positive numbers to add , Use negative numbers to indicate deletion .
Examples #1
The sample input #1
0 1 2 2 2 7Sample output #1
1 0 0 0 0 1Examples #2
The sample input #2
2 1 2 1 2 1Sample output #2
-1 0 0 1 0 7Tips
explain
The title is translated from COCI2007-2008 CONTEST #2 T1 BIJELE.
AC code:
#include<iostream>
#include<algorithm>
using namespace std;
// 1 1 2 2 2 8
int main()
{
int a[6];
for(auto &i:a) // Note that it must be added here &!!!
cin>>i;
cout<<1-a[0]<<" "<<1-a[1]<<" "<<2-a[2]<<" "<<2-a[3]<<" "<<2-a[4]<<" "<<8-a[5];
return 0;
}边栏推荐
- 【MYSQL】-【子查询】
- gcc/g++的使用
- Using C language to skillfully realize the chess game -- Sanzi chess
- 如何与斯堪尼亚SCANIA建立EDI连接?
- 请问flink支持sqlServer数据库么?获取sqlServer数据库的变化
- 能在SQL 语句中 指定 内存参数吗?
- gin abort不能阻止后续代码的问题
- Leetcode 209. subarray with the smallest length (2022.07.28)
- Clock tree synthesis (I)
- QT连接两个qslite数据库报错QSqlQuery::exec: database not open
猜你喜欢

Use of gcc/g++

如何与斯堪尼亚SCANIA建立EDI连接?

Variables and encryption in ansible

Remote invocation of microservices

3-全局异常处理

Kubernetes (V) -- deploy kubernetes dashboard

09 bloom filter

It's enough for MySQL to have this article (disgusting and crazy typing 37k words, just for Bo Jun's praise!!!)

3-global exception handling

halcon的安装以及在vs2017中测试,vs2017中dll的配置
随机推荐
Paper reading (62):pointer networks
Gin routing, parameters, output
使用自定义注解校验list的大小
cdc source能读完MySqlSnapshotSplit 就退出嘛
NFT 的 10 种实际用途
Gin Middleware
js第四天流程控制(if语句和switch语句)
【暑期每日一题】洛谷 P6336 [COCI2007-2008#2] BIJELE
Remote invocation of microservices
How to establish EDI connection with Scania in Scania?
logback简介及引入方法
How to use GS_ Expansion expansion node
SEGGER 的硬件异常 分析
Operator3 - design an operator
logback appender简介说明
QT连接两个qslite数据库报错QSqlQuery::exec: database not open
MySQL如何把行转换为列?
BeanUtils.setProperty()
用户列表 圆形头像并跟随小板块
Vagrant box cluster processing