Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
	int n, m;
	int chose1, chose2;
	int i;
	int* list;
	
	while( 1 ){
		scanf( "%d %d", &n, &m );
		if(( n == 0) && ( m == 0 ))
		list = ( int* )malloc( sizeof( int ) * n );
		for( i = 0; i < n; i++ ){
			scanf( "%d", &( list + i ));
		}
		
		max = 0;
		for( i = 0; i < n; i++ ){
			if(( max < &( list + i )) && (( m / 2 ) < &( list + i ))){
				max = &( list + i );
				chose1 = i;
			}
		}
		
		&( list + chose1 ) = 0;
		max = 0;
		for( i = 0; i < n; i++ ){
			if(( max < &( list + i )) && (( m - &( list + chose1 )) <= &( list + i ))){
				max = &( list + i );
				chose2 = i;
			}
		}
		
		if(( &( list + chose1 ) == 0 ) || ( &( list + chose2 ) == 0 )){
			printf( "NONE\n" );
		}
		else{
			printf( "%d\n", &( list + chose1 ) + &( list + chose2 ));
		}
		free( list );
	}
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:14:38: error: lvalue required as unary '&' operand
   14 |                         scanf( "%d", &( list + i ));
      |                                      ^
main.c:17:17: error: 'max' undeclared (first use in this function)
   17 |                 max = 0;
      |                 ^~~
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:36: error: lvalue required as unary '&' operand
   19 |                         if(( max < &( list + i )) && (( m / 2 ) < &( list + i ))){
      |                                    ^
main.c:19:67: error: lvalue required as unary '&' operand
   19 |                         if(( max < &( list + i )) && (( m / 2 ) < &( list + i ))){
      |                                                                   ^
main.c:20:39: error: lvalue required as unary '&' operand
   20 |                                 max = &( list + i );
      |                                       ^
main.c:25:17: error: lvalue required as unary '&' operand
   25 |                 &( list + chose1 ) = 0;
      |                 ^
main.c:28:36: error: lvalue required as unary '&' operand
   28 |                         if(( max < &( list + i )) && (( m - &( list + chose1 )) <= &( list + i ))){
      |                                    ^
main.c:28:61: error: lvalue required as unary '&' operand
   28 |                         if(( max < &( list + i )) && (( m - &( list + chose1 )) <= &( list + i ))){
      |                                                             ^
main.c:28:84: error: lvalue required as unary '&' operand
   28 |                         if(( max < &( list + i )) && (( m - &( list + chose1 )) <= &( list + i ))){
      |                                                                                    ^
main.c:29:39: error: lvalue required as unary '&' operand
   29 |                                 max = &( list + i );
      |                                       ^
main.c:34:22: error: lvalue required as unary '&' operand
   34 |                 if(( &( list + chose1 ) == 0 ) || ( &( list + chose2 ) == 0 )){
      |                      ^
main.c:34:53: error: lvalue required as unary '&' operand
   34 |                 if(( &( list + chose1 ) == 0 ) || ( &( list + chose2 ) == 0 )){
      |                                                     ^
main.c:38:41: error: lvalue required as unary '&' operand
   38 |                         printf( "%d\n", &( list + chose1 ) + &( list + chose2 ));
      |                                         ^
main.c:38:62: error: lvalue required as unary '&' operand
   38 |                         printf( "%d\n", &( list + chose1 ) + &( list + chose2 ));
      |                                                              ^