Codeforces 1047A Little C Loves 3 I
小學數學題。
最近實驗多了,要寫報告,為了保證每日一題的數量,只能找簡單題做了2333333
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <algorithm> #include <deque> #include <iostream> #include <string> #include <math.h> using namespace std; int n; int main() { scanf("%d", &n); int mod = n % 3; if (mod == 0||mod==1) { printf("%d %d %d\n", 1, 1, n - 2); } else{ printf("%d %d %d\n", 1, 2, n - 3); } //system("pause"); return 0; }
相關推薦
CodeForces 1047A Little C Loves 3 I (水題)
Little C loves number «3» very much. He loves all things about it. Now he has a positive integer nn. He wants to split nn into 33 positiv
Codeforces 1047A Little C Loves 3 I
小學數學題。 最近實驗多了,要寫報告,為了保證每日一題的數量,只能找簡單題做了2333333 #define _CRT_SECURE_NO_WARNINGS #include <cstdio
Little C Loves 3 I(CodeForces 1047A)
Description Little C loves number «3» very much. He loves all things about it. Now he has a positive integer nn. He wants to split nn in
A. Little C Loves 3 I Codeforces Round #511 (Div. 2) 【數學】
pos == force line for 最大 header 應該 XML 題目: Little C loves number ?3? very much. He loves all things about it. Now he has a positive
Codeforces Round #511 (Div. 2).A. Little C Loves 3 I(水題)
A. Little C Loves 3 I time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output
【題解】codeforces1047A[Codeforces Round #511 (Div. 2)]A.Little C Loves 3 I 數學知識
題目連結 Description Little C loves number «3» very much. He loves all things about it. Now he has a positive integer n. He wants to sp
【CodeForces - 1034B】Little C Loves 3 II
@Little C Loves 3 [email protected] @題目描述 - [email protected] @中文題意@ @分析@ @程式碼@ @[email protected
Codeforces Round #511 (Div. 1) T2 Little C Loves 3 II
題目 Little C loves number «3» very much. He loves all things about it. Now he is playing a game on a chessboard of size n×mn \times
Codeforces Round #511 (Div. 2) D. Little C Loves 3 II
codeforces上的一道題,AC程式碼貼在最後面 目錄 1.猜想 2.嘗試 1.猜想 容易得出一個 n * m 的棋盤,有以下結論: (1) 如果 n * m 為偶數,棋盤最多能放 n * m 個棋子; (2) 如果 n * m 為奇數,棋盤最多能放 n
codeforces511div1_b Little C Loves 3 II (二分圖匹配+打表+找規律)
題意 給出 n和m並且 1 < n
1034B】Little C Loves 3 II
@Little C Loves 3 [email protected] @題目描述 - [email protected] time limit per test: 1 second memory limit per test: 256
Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) E. Buy Low Sell High [貪心 II][數據結構 I]
fin 想想 ima 直接 圖片 test 只需要 數據結構 lan 題目:http://codeforces.com/contest/867/problem/E 題意:模擬股票操作,每天只能買一只股票或者賣一只股票或者什麽也不做,求最大利潤。 題解:仔細想想是非常簡單的
Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) C. Ordering Pizza
scanf col size class sql == 我們 個人 ++ 題意:有2種pizzaA和B,有n個人,每塊pizz分為S片,給出每個人需要吃s片,吃一片A獲得x的幸福,吃一片B獲得y的幸福,問在購買最少的Pizza的前提下獲得的最大幸福值 思路:註意每個人可同時
Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) E. Buy Low Sell High
amp base multiset ret pac multi 刪掉 股票 ems 題意:一些股票的價格,我們可以選擇買進賣出,但一天只有一個操作,問最大盈利 思路:對於當天,如果賣出的話&&之前有比他小的,我們肯定是找個最小那天的買進,但又不知道現在賣是不
Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2)
eno possible ane following ces force ros spec test case A. Between the Offices time limit per test 2 seconds memory limit per test
C++筆記(3):運算符重載
存在 新的 邏輯運算符 int() 取地址 參數 spl this 函數的重載 運算符重載 1.運算符重載基礎 2.運算符重載的規則 3.重載雙目運算符 4.重載單目運算符 5.重載流插入和提取運算符 6.類型轉換 7.定義自己的st
C(3)
i+1 不能 () 可能 實現 空格 i++ 輸出 輸入 多次運用循環,條件語句,定義數組,排序 旅行團需要租帆船進行冒險活動,一條帆船最多乘坐兩人,且乘客的總重量不能超過帆船的最大載重。為盡可能的減少活動花銷,你要找出最少帆船條數。現寫一個程序,輸入帆船的最大載重(應大於
高速掌握Lua 5.3 —— I/O庫 (1)
跳過 控制 ont haml end {} simple table 最大 Q:什麽是”Simple Model”? A:全部的文件操作都基於一個默認的輸入文件和一個默認的輸出文件。這就意味著同一時間對於輸入和輸出來說,僅僅可操作一個文件(默認的文件)
codeforces gym101243 A C D E F G H J
pen wap style false __int64 output for ans ces gym101243 A 1 #include<iostream> 2 #include<cstdio> 3 #include<cma
Codeforces Round #422 (Div. 2) A. I'm bored with life 暴力
out line leave c++ ren round ... from cif A. I‘m bored with life Holidays have finished. Thanks to the help of t