第八屆福建省大學生程式設計競賽-重現賽(感謝承辦方廈門理工學院)
Pro.A Frog
fzu2272
雞兔同籠
#include<stdio.h>
int main()
{
int t,a,b;
scanf("%d",&t);
while(t--) scanf("%d%d",&a,&b),printf("%d %d\n",(b/2-a,2*a-b/2);
}
相關推薦
第八屆福建省大學生程式設計競賽-重現賽(感謝承辦方廈門理工學院)
Pro.A Frog fzu2272 雞兔同籠 #include<stdio.h> int main() { int t,a,b; scanf("%d",&am
第八屆福建省大學生程式設計競賽-FZU 2280 HASH處理+暴力搜尋
題目:Problem 2280 Magic Problem Description Kim is a magician, he can use n kinds of magic, number from 1 to n. We use string Si to describe m
第八屆福建省大學生程式設計競賽-FZU 2277 DFS +線段樹+讀入掛
FZU 2277 Problem 2277 Change Accept: 245 Submit: 1186 Time Limit: 2000 mSec Memory Limit : 262
“浪潮杯”山東省第八屆ACM大學生程式設計競賽I
Fascinated with the computer games, Gabriel even forgets to study. Now she needs to finish her homework, and there is an easy problem: f(n)= She is requir
“浪潮杯”山東省第八屆ACM大學生程式設計競賽 J
sell goods whose price with order as -1, 5, 6, 6, the total benefit would be -1*1 + 5*2 + 6*3 + 6*4 = 51. 01 #include <iostream>
“浪潮杯”第九屆山東省ACM大學生程式設計競賽重現賽 題解
點選轉到(牛客網) 1.思路: 給定兩個字串,假設是ELLY與KRIS,E到K是6,L到R是6,當第二個L到I時,L是比I大的,此時L就要繞到Z,從Z到A,再從A開始到I,這樣長度就是23,Y到S同理,長度是20;這樣找完之後序列長度之和就是6 +6+23
“浪潮杯”第九屆山東省ACM大學生程式設計競賽重現賽 G game (尼姆博弈)
題目描述 Alice and Bob are playing a stone game. There are n piles of stones. In each turn, a player can remove some stones from a pile (th
第八屆ACM趣味程式設計競賽第四場(正式賽)A B C
Yitong_Qin and Xiaoyu_Chen are playing a game.There are $N$ stones placed on the ground,forming a sequence. Thr stones are labeled from 1 to N. Yitong_Qin
2017河南省第十屆ACM大學生程式設計競賽總結
河南第十屆大學生程式設計競賽總結 比賽過程隊友部落格有記錄:http://blog.csdn.net/dreamNYC/article/details/71417450 主要就總結下這次比賽的感受: 我們隊雖然和
第八屆ACM趣味程式設計競賽第三場(正式賽)官方題解
Source:LinPC 題解:首先預處理統計a-z字元的數量,根據漸變字串的定義,由於總字元數較小,所以可以列舉漸變字串的起點,然後找到由該起點起始的最大漸變字串,然後從統計的字元中刪除所用字元,如此迴圈操作至剩餘字元數為0即可 題解: 易得,只要最長的那條
2015年山東省第六屆ACM大學生程式設計競賽-B-Lowest Unique Price
Link: http://www.sdutacm.org/sdutoj/problem.php?action=showproblem&problemid=3252 Lowest Unique Price Time Limit: 1000ms
SDUT 3258 Square Number(2015年山東省第六屆ACM大學生程式設計競賽)
Square Number Time Limit: 1000ms Memory limit: 65536K 有疑問?點這裡^_^ 題目描述 In mathematics,
山東省第七屆ACM大學生程式設計競賽 總結
很惋惜的一場比賽,比賽前我想了很多個結局,可能是銀牌中等,銀牌末尾,要是運氣好的可能能混一個金牌回來。。但是銀首這個真的是超乎我意料之外。。。 開始比賽的不久我就看到了K題,一個作為簽到題的存在,開始習慣性的先敲輸入輸出。寫完輸入輸出之後感覺沒有比較好寫的思路
Fruit Ninja II(山東省第三屆ACM大學生程式設計競賽 )
Have you ever played a popular game named "Fruit Ninja"? Fruit Ninja (known as Fruit Ninja HD on the iPad and Fruit Ninja THD for Nvidia Tegra 2 based A
電子科技大學第八屆ACM趣味程式設計競賽第二場題解
A陰陽師?這遊戲沒有ssr! 題解: ans = sigma(1 - (1 - Pi/100)^ 2); 標程: #include <stdio.h> #include <stdlib.h> int main() { int N,p;
山東省第三屆ACM大學生程式設計競賽 Fruit Ninja I(01揹包)
01揹包 加上vector的運用,貪心sort排序 #include <stdio.h> #include <vector> #include <string.h>
第十四屆浙江財經大學程式設計競賽重現賽(牛客網)
題意:給定n塊高度的石頭和區間k,問怎樣排序才能使n的所有長度為k的子區間最大值減最小值和最小。思路:貪心,因為距離差值越小則對答案貢獻越小,所以sort一下就好了程式碼:#include<cstdio> #include<cmath> #includ
2016CCPC東北地區大學生程式設計競賽 - 重現賽
A 題目連線:HDU 5922 Minimum’s Revenge 水題,每次連線上1就行,就是一個等差數列。 #include<iostream> #include<algorithm> #include<cstring
今日頭條杯 2018 年首屆湖北省大學生程式設計競賽 (網路賽)Problem B.(計算幾何)
Problem B. GSS and Interesting SculptureInput file: standard inputOutput file: standard outputTime limit: 1 secondsMemory limit: 512 mebib
第14屆浙江大學程式設計競賽 A. Elevator(ZOJ 3767)
【來源】 【分析】 略 【原始碼】 #include <iostream> using namespace std; int main() { int T; cin >> T; while (T--){