ural 1155. Troubleduons

news/2024/10/23 11:25:00/

1155. Troubleduons

Time limit: 0.5 second
Memory limit: 64 MB
Archangel of the Science is reporting:
“O, Lord! Those physicists on the Earth have discovered a new elementary particle!”
“No problem, we’ll add another parameter to the General Equation of the Universe.”
As physics develops and moves on, scientists find more and more strange elementary particles, whose properties are more than unknown. You may have heard about muons, gluons and other strange particles. Recently scientists have found new elementary particles called troubleduons. These particles are called this way because scientists can create or annihilate them only in couples. Besides, troubleduons cause trouble to scientists, and that’s why the latter want to get rid of them. You should help scientists get rid of troubleduons.
Problem illustration
Experimental set consists of eight cameras, situated in the vertices of a cube. Cameras are named as A, B, C, …, H. It is possible to generate or annihilate two troubleduons in neighbouring cameras. You should automate the process of removing troubleduons.

Input

The only line contain eight integers ranging from 0 to 100, representing number of troubleduons in each camera of experimental set.

Output

Output sequence of actions leading to annihilating all troubleduons or “IMPOSSIBLE”, if you cannot do it. Actions should be described one after another, each in a separate line, in the following way: name of the first camera, name of the second camera (it should be a neighborough to the first one), “+” if you create troubleduons, “-” if you destroy them. Number of actions in the sequence should not exceed 1000.

Samples

inputoutput
1 0 1 0 3 1 0 0 
EF-
EA-
AD+
AE-
DC-
0 1 0 1 2 3 2 2
IMPOSSIBLE
Problem Source: Ural Collegiate Programming Contest, April 2001, Perm, English Round 
Tags: none   ( hide tags for unsolved problems )

转载于:https://www.cnblogs.com/StupidBoy/p/4902963.html


http://www.ppmy.cn/news/154071.html

相关文章

比较 ERC-721 和 ERC-1155

比较 ERC-721 和 ERC-1155 以太坊上新应用的到来,促使开发团队设计了新的代币标准。在早期,ERC-20代币标准(它定义了DAI或UNI等传统代币的功能)主导了市场。这种加密方法将所有资产视为完全可互换的(称为可互换性),在概念上就像美元等货币一样…

使用openZeppelin搭建ERC1155合约

安装openZeppelin npm install --save-dev openzeppelin/contracts 创建一个truffle空项目 mkdir FishToken cd FishToken truffle init 在contracts目录下创建基于ERC1155的智能合约FishToken.sol pragma solidity >0.6.0 <0.9.0;import "openzeppelin/contra…

pat1155

简单的递归 递归操作&#xff0c;不值30分 #include<iostream> #include<vector>using namespace std; int a[1001]; int isMin1; int isMax1; vector<int> v; int n; void dfs(int root) {//定义边界if(2*root>n){if(root<n){for(int i0;i<v.siz…

1155 服务器芯片组,华硕服务器主板 P8B-E/4L 单路1155针脚 四千兆网卡

P8B-E/4L 产品概述 产品规格 产品图库 服务与支持 的Bromolow 旗舰服务器主板 华硕 P8B-E/4L 是针对 Bromolow 平台而特别设计的服务器主板,采用英特尔 C204 PCH芯片组,集结了SATA 6G存储技术,四个英特尔 服务器级千兆网卡,ASMB5-iKVM远程管理模块及支持多种操作系统,这使…

如何创建和部署 ERC-1155 NFT

概述 ERC1155 已成为创建 NFT 的黄金标准&#xff1b;每个主要市场都将新代币列为 ERC1155 标准。在本文中&#xff0c;我们将了解 ERC1155 代币标准以及如何创建 ERC1155 代币。 我们将要做什么&#xff1a; 创建 3 个 NFT 集合创建和部署 ERC-1155 合约更新合约以兼容 Ope…

PAT日志 1155

顽强的小白 1155 Heap Paths &#xff08;30 分&#xff09; In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to…

1155 Heap Paths

题目 题意&#xff1a;给定完全二叉树的层序遍历&#xff0c;问该二叉树是否为堆。为什么堆&#xff0c;以及输出它的后序遍历 #include<iostream> #include<vector> using namespace std; int n,m; int s[1003]; vector<int>post; bool maxheap() {for(i…

ERC-1155 标准

ERC-1155 标准 1. 概念 ERC 是 Ethereum Request for Comments&#xff08;以太坊征求意见提案&#xff09;的缩写&#xff0c;代表着以太坊已正式化的提案&#xff0c;它是由 EIP&#xff08;Ethereum Improvement Proposals 以太坊升级提案&#xff09;经过以太坊开发团队的…