Dont Cry

search for 119
Moderator: Board moderators
Code: Select all
REMOVED
Code: Select all
printf("\n\n");
for(i=1;i<=n;i++)
{
if(i!=1)
printf("\n");
printf("%s %ld",str[i],arr1[i]);
strcpy(str[i],"\0");
}
printf("\n");
Code: Select all
caseno=0;
while(input())
{
/* Process */
if(caseno++)
printf("\n");
for(i=1;i<=n;i++)
printf("%s %ld\n",str[i],arr1[i]);
/* Rest of the Code, But no printing */
}
Code: Select all
#include<stdio.h>
#include<string.h>
main()
{
int np,i,j,k,amount,ppbal[12],nopp,ebal;
char ppname[10][12],whoname[12];
while (scanf("%d",&np)!=EOF) {
for (i=0;i<np;i++) {
scanf("%s",ppname[i]);
ppbal[i]=0;
}
/*Deleted after AC*/
for (i=0;i<np;i++) {
printf("%s %d\n",ppname[i],ppbal[i]);
}
putchar('\n');
}
return 0;
}
Code: Select all
/** DELETED AFTER AC **/
Code: Select all
while(!feof(stdin)){
scanf("%d",&member);
Code: Select all
while (scanf("%d", &member) != EOF) {
Code: Select all
//Question http://acm.uva.es/p/v1/119.html
//CPU: , Memory:
#include <iostream>
#include <cstring>
using namespace std;
char name[10][13];
int main()
{
while(true){
if( cin.fail() )
break;
int n, own[10];//={0};
cin >> n;
/* remove */
}
Code: Select all
...
int main()
{
while(true){
if( cin.fail() )
break;
int n, own[10];//={0};
cin >> n;
...
Code: Select all
...
int main()
{
int n;
while(cin >> n){
int own[10];//={0};
...