原创 CodeForces 706C Hard problem【dp】

Description Vasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he a

原创 UVALive 7337 Counting Weekend Days【水題】

題目鏈接 /* 題意:給你一個月份和這個月份的第一個星期幾,問你有幾個星期六日 類型:模擬 分析:簡單模擬,打表日期不小心WA了一次QAQ */ #include<cstdio> #include<iostr

原创 中國剩餘定理模版【中國剩餘定理】

/* 問題:求解 n個方程:x=a[i](mod m[i]) (0<=i<n) 的x 類型:中國剩餘定理 吐槽:這個模版要求m[i]之間兩兩互質啊QAQ */ #include<cstdio> #include<

原创 Gym 101138B Pen Pineapple Apple Pen【水題】

Description standard input/outputStatements PPAP, which stands for Pen Pineapple Apple Pen, is an unusual song and

原创 UVALive 7336 Automatic Cheater Detection【水題】

題目鏈接 /* 題意:給你n個題目的情況,分別是題目的難度[1,10],是否泄題0/1,是否答對i/c 如果存在"答對難度大且泄題"(1,c) 卻 "沒答對難度小且沒泄題"的題目(0,i),

原创 UVALive 6906 Cluster Analysis【水題】

題目鏈接 /* 題意:給你n個數字和一個差值k,當兩個數的差值小於k時,這兩個數是同一個集合裏的, 求不同集合的個數 類型:水題 分析:N只有100,排個序直接暴力搞 */ #include<

原创 C++變量聲明和定義的關係

聲明:使得名字爲程序所知,一個文件如果想使用別處定義的名字,則必須包含對那個名字的聲明。 定義:負責創建與名字關聯的實體。 變量的定義必須出現且只能出現在一個文件中,而其他要用到該變量的文件必須對其進行聲明,且不能重複定義。 聲明的方法:

原创 CodeForces 405A Gravity Flip【水題】

Description Little Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself

原创 01 標籤

#include <QApplication> #include <QLabel> int main(int argc,char *argv[]) { QApplication app(argc,argv); QLabel

原创 codeforces 746 A.Compote【水題】

A. Compote time limit per test 1 second memory limit per test 256 megabytes input standard input output standa

原创 Gym 101138C Stickmen【枚舉+排列組合】

Description standard input/outputStatements Limak is a little bear who loves to play with graphs. Recently, he defi

原创 CodeForces 405C Unusual Product【思維】

Description Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual

原创 CodeForces 405D Toy Sum【思維】

Description Little Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems,

原创 HYSBZ 1588 營業額統計【伸展樹】

Description 營業額統計 Tiger最近被公司升任爲營業部經理,他上任後接受公司交給的第一項任務便是統計並分析公司成立以來的營業情況。 Tiger拿出了公司的賬本,賬本上記錄了公司成立以來每天的營業額。分析營業情況是一項

原创 codeforces 746 C. Tram【水題】

C. Tram time limit per test 1 second memory limit per test 256 megabytes input standard input output stan