433B.Kuriyama Mirai's Stones】的更多相关文章

Kuriyama Mirai has killed many monsters and got many (namely n) stones. She numbers the stones from 1 to n. The cost of the i-th stone is vi. Kuriyama Mirai wants to know something about these stones so she will ask you two kinds of questions: She wi…
Kuriyama Mirai has killed many monsters and got many (namely n) stones. She numbers the stones from 1 to n. The cost of the i-th stone is vi. Kuriyama Mirai wants to know something about these stones so she will ask you two kinds of questions: She wi…
题目简单描述就是求数组中[l,r]区间的和 #include <iostream> #include <vector> #include <string> #include <algorithm> #include <numeric> using namespace std; int main(){ int n,m; cin >> n; vector<,); ; i <= n ; ++ i) cin >> v[…
Content 有一个长度为 \(n\) 的数组 \(a_1,a_2,a_3,...,a_n\).有 \(m\) 次询问,询问有以下两种: \(1~l~r\),求 \(\sum\limits_{i=l}^ra_i\). \(2~l~r\),将数组非降序排列后再依次标号,然后再求 \(\sum\limits_{i=l}^ra_i\). 数据范围:\(1\leqslant l\leqslant r\leqslant n\leqslant 10^5,1\leqslant m\leqslant 10^5…
Kuriyama Mirai's Stones CodeForces - 433B 有n颗宝石,每个宝石都有自己的价值. 然后m次询问.问区间[i,j]的宝石的总值,或者问排序后的区间[i,j]的总值. Input第一行输入一个n(1 <= n <=10^5),表示n个宝石 第二行n个数,v1, v2, ..., vn (1 ≤ vi ≤ 10^9) ,表示每个宝石的价值 第三行输入询问次数m(1≤m≤10^5). 然后m行,每行包含三个整数类型,type.l和r( 1 ≤ l ≤ r ≤n:…
比赛链接:http://codeforces.com/contest/433 A. Kitahara Haruki's Gift time limit per test:1 second memory limit per test:256 megabytes Kitahara Haruki has bought n apples for Touma Kazusa and Ogiso Setsuna. Now he wants to divide all the apples between th…
Anna-senpai这个人太好玩了,整件事就像没有黄段子的无聊世界那样. 无聊翻译了一下,顺便实验了效果. ------------------------------------------------------------------------------------------------------------- [免费]世界上最大的僵尸网络:Mirai 僵尸网络 客户端,服务端,控制台,源代码发布 -安娜先辈 前言:大家好哇 当我刚刚进入ddos业界的时候,我不打算玩太长的时间.…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5973 Game of Taking Stones Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) 问题描述 Two people face two piles of stones and make a game. They take turns to take stones. As ga…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4573 Problem Description Remember our childhood? A few naked children throw stones standing on the same position, the one throws farther win the game. Aha, of course, there are some naughty boys who care…
Soma is a fashionable girl. She absolutely loves shiny stones that she can put on as jewellery accessories. She has been collecting stones since her childhood - now she has become really good with identifying which ones are fake and which ones are no…