| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84778 | sh25_shenpy | 排三角形 | C++ | 解答错误 | 2 MS | 192 KB | 520 | 2026-02-25 15:20:32 |
#include <cstdio> #include <algorithm> int P; int A[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; // a b c d e f g h i int main() { scanf("%d", &P); int cnt = 0; do { if(A[1] + A[2] + A[4] + A[6] == P && A[6] + A[7] + A[8] + A[9] == P && A[9] + A[5] + A[3] + A[1] == P && A[1] < A[6] && A[6] < A[9] && A[2] < A[4] && A[7] < A[8] && A[3] < A[5]) cnt++; } while(std::next_permutation(A + 1, A + 10)); printf("%d", cnt); return 0; }