Codeforces Round #411 C. Find Amir
来源:互联网 发布:编辑身份证照片软件 编辑:程序博客网 时间:2024/05/29 04:11
题意
A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.
There are n schools numerated from 1 to n. One can travel between each pair of them, to do so, he needs to buy a ticket. The ticker between schools i and j costs
任意选择起点和终点,要求遍历标号为 1 ~ n
的学校,从学校 i
到达学校 j
的花费为
解题思路
根据
因此,遵循下列路径的走法将是最小费用
代码
#include<bits/stdc++.h>using namespace std;int main(){ int n; scanf("%d",&n); printf("%d\n", (n-1)/2);}
0 0
- Codeforces Round #411 C. Find Amir
- Codeforces Round #411 (Div. 2) C. Find Amir
- Codeforces Round #411(Div. 2)C. Find Amir【思维】
- Codeforces Round #411 C.Find Amir (思维题)
- 【Codeforces Round #411 (Div. 1)】Codeforces 804A Find Amir
- Codeforces Round #411 (Div. 2) C. Find Amir(简单题目)
- CodeForces 805C Find Amir
- Codeforces 805C Find Amir
- codeforces 411 div2-find amir
- Codeforces Round #411(A. Fake NP; B. 3-palindrome; C. Find Amir; D.Minimum number of steps)
- Codeforces805 C. Find Amir
- C. Find Amir
- [Codeforces805] C. Find Amir
- codeforces 804A Find Amir
- codeforces 804A——Find Amir
- Find Amir
- 小白题解 Codeforces 804A Find Amir
- CF411div2C.Find Amir
- 如果你觉得功能测试只是点点点,那请离开测试这行
- Codeforces805 A. Fake NP
- [莫队 bitset] BZOJ 4810 [Ynoi2017]由乃的玉米田
- SSL双向认证
- Intellij IDEA+Tomcat+JRebel热部署
- Codeforces Round #411 C. Find Amir
- 基于SSM框架maven管理的RAS密码加密算法
- [线段树] BZOJ 4821 [Sdoi2017]相关分析
- Codeforces Round #411 D. Minimum number of steps
- Codeforces805B. 3-palindrome
- ISMS
- HDU
- DRML(2016-CVPR)重现过程记录---(5)问题定位_1
- 页面加载初始化常用的三种方法