Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- /* Read a number and an array */
- int main(int argc, const char * argv[]) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // memory release
- int n;
- scanf("%i", &n);
- int nums[n];
- for(int num = 0; num < n; num++){
- scanf("%i", &nums[num]);
- // treat your problem here
- }
- [pool drain]; // memory release
- return 0;
- }
- /* Read a number and some strings */
- int main(int argc, const char * argv[]) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- int n;
- scanf("%i", &n);
- for (int a0 = 0; a0 < n; a0++) {
- NSString *str;
- char *str_temp = (char *)malloc(512000 * sizeof(char));
- scanf("%s", str_temp);
- acid_name = [NSString stringWithFormat:@"%s", str_temp];
- // treat your problem here
- }
- [pool drain];
- return 0;
- }
Add Comment
Please, Sign In to add comment