#include <bits/stdc++.h>
using namespace std;
int a,b,c,pa,pb,pc,sum,maks;
int main()
{
scanf("%d%d%d",&a,&b,&c);
scanf("%d%d%d",&pa,&pb,&pc);
sum = pa+pb+pc;
maks = max(max(pa,pb),max(max(pa,pc),max(pb,pc)));
// cout<<maks;
for(int i=0; i<=c; i++)
{
if(i==pa || i==pb || i==pc)
{
cout<<"0";
}
else
{
if((i==a || i==b || i==c) && (pa+pb+pc)>=i)
{
cout<<"1"<<" ";
}
else
{
cout<<"1"<<" ";
}
}
}
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #include <bits/stdc++.h> using namespace std; int a,b,c,pa,pb,pc,sum,maks; int main() { scanf("%d%d%d",&a,&b,&c); scanf("%d%d%d",&pa,&pb,&pc); sum = pa+pb+pc; maks = max(max(pa,pb),max(max(pa,pc),max(pb,pc))); // cout<<maks; for(int i=0; i<=c; i++) { if(i==pa || i==pb || i==pc) { cout<<"0"; } else { if((i==a || i==b || i==c) && (pa+pb+pc)>=i) { cout<<"1"<<" "; } else { cout<<"1"<<" "; } } } return 0; } |
English