Problem 2744 --Structure and Class - Dice II

2744: Structure and Class - Dice II

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $2$ 正确数量 $1$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Dice II 

Construct a dice from a given sequence of integers in the same way as Dice I. 

You are given integers on the top face and the front face where the dice was rolled in the same way as Dice I. Write a program to print an integer on the right side face.

In the first line, six integers assigned to faces are given in ascending orde\ r of their corresponding labels. In the second line, the number of questions q is given. 

In the following q lines, q questions are given. Each question consists of two integers on the top face and the front face respectively.

For each question, print the integer on the right side face.
1 2 3 4 5 6
3
6 5
1 3
3 2
3
5
6

0≤ the integer assigned to a face ≤100 

The integers are all different 

1≤q≤24

推荐代码 查看2744 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] AOJ大管家 411621 2019-04-28 15:14:21
内存最少[$2020 $KB] AOJ大管家 411621 2019-04-28 15:14:21
第一AC AOJ大管家 411621 2019-04-28 15:14:21
第一挑战 AOJ大管家 411621 2019-04-28 15:14:21

赛题来源/所属竞赛 会津大学《C++ Programming I》 C++程序设计(入门)

竞赛编号 竞赛名称 竞赛时间 访问比赛