#include<bits/stdc++.h>
using namespace std;
int n,ans;
int main(){
cin>>n;
for(int a=1;a<=3;a++){
for(int b=1;b<=3;b++){
for(int c=1;c<=3;c++){
for(int d=1; d<=3; d++){
for(int e=1; e<=3; e++){
for(int f=1; f<=3; f++){
for(int g=1; g<=3; g++){
for(int h=1; h<=3; h++){
for(int r=1; r<=3; r++){
for(int w=1; w<=3; w++){
if(a+b+c+d+e+f+g+h+r+w==n){
ans++;
}
}
}
}
}
}
}
}
}
}
}
for(int a=1;a<=3;a++){
for(int b=1;b<=3;b++){
for(int c=1;c<=3;c++){
for(int d=1; d<=3; d++){
for(int e=1; e<=3; e++){
for(int f=1; f<=3; f++){
for(int g=1; g<=3; g++){
for(int h=1; h<=3; h++){
for(int r=1; r<=3; r++){
for(int w=1; w<=3; w++){
if(a+b+c+d+e+f+g+h+r+w==n){
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" "<<g<<" "<<h<<" "<<r<<" "<<w<<" "<<endl;
}
}
}
}
}
}
}
}
}
}
}
return 0;
}
P2089 烤鸡
C++chaofan2025-05-25 18:05
相关推荐
apocelipes19 小时前
常用编程语言和库的正则表达式性能对比HjhIron20 小时前
面试常客:字符串算法从入门到进阶吴佳浩1 天前
DeepSeek DSpark:Confidence-Scheduled Speculative Decoding 技术解析触底反弹1 天前
🧠 搞懂 Token,才算真正入门大模型——从分词原理到 Embedding 语义实战vivo互联网技术1 天前
ICLR 2026 | 基于后验采样的图像恢复方法LearnIR:人脸去阴影、去雾浮生望1 天前
JS字符串与回文算法:从包装类到双指针的面试进阶之路黄敬峰1 天前
面试必刷:从JS底层包装类到双指针,彻底搞懂字符串与回文算法地平线开发者2 天前
J6B vio scenario sampleBothSavage2 天前
Trae远程开发中DeepSeek自定义模型4054错误的排查与修复