题解 1169: 绝对值排序
摘要:参考代码:#include<stdio.h>#include<math.h>#define N 100void main(){ int i,j,k,s,t,temp,a[N][N]; f……
最简单的方法,我敢保证
摘要:解题思路:再重新搞一个数组b,b的位置要对应a的位置,b数组是a数组绝对值的翻版,所以用它来比较大小,这个答案在网页上错误50%,我也不懂,但是这个放在DEVC++上的结果是正确的,注意事项:参考代码……
1169: 绝对值排序
摘要:C语言网刷题以来首次碰到用 pair 的题。#include<bits/stdc++.h>
using namespace std;
bool cmp(pair<int,int> &a,pa……
python 容易理解
摘要:解题思路:注意事项:参考代码:ls =list(map(int,input().split()))while ls[0] != 0: lt = ls[1:] b=[] for i i……