Language: Java

import java.util.*;
class Main{
 
int n;
int t[]= new int[102];
int v[] = new int[101];
int a[] = new int[20100];
int b[] = new int[20100];
int s;
double ans;
 
public static void  main(String args[]){
Scanner in = new Scanner (System.in);	
n = Integer.parseInt(in.next());
	for(int i=1; i<=n; ++i){
		t[i]=Integer.parseInt(in.next());
		s += t[i];
		t[i] += t[i-1];
	}
	++t[n+1];
	t[n+1] += t[n];
//	for(int i=0; i<=n+1; ++i) printf("%d\t", t[i]);
//	printf("\n");
	for(int i=1; i<=n; ++i){
		v[i]=Integer.parseInt(in.next());
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
	}
	for(int i=0; i<=s; ++i) a[i] = Math.min(i, s-i);
//	for(int i=0; i<=s; ++i) printf("%d\t", a[i]);
//	printf("\n");
	for(int i=1; i<=n; ++i){
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
	}
//	for(int i=0; i<=s; ++i) printf("%d\t", a[i]);
//	printf("\n");
	for(int i=1; i<s; ++i) ans += (float)a[i];
	for(int i=1; i+3<s; ++i){
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
			ans += 0.25;
	}
	Sytem.out.println(ans);
//	for(int i=1; i<s; ++i) printf("%d %d\n", a[i], b[i]);
}}

Compiler output:
Main.java:14: error: non-static variable n cannot be referenced from a static context
n = Integer.parseInt(in.next());
^
Main.java:15: error: non-static variable n cannot be referenced from a static context
	for(int i=1; i<=n; ++i){
	                ^
Main.java:16: error: non-static variable t cannot be referenced from a static context
		t[i]=Integer.parseInt(in.next());
		^
Main.java:17: error: non-static variable s cannot be referenced from a static context
		s += t[i];
		^
Main.java:17: error: non-static variable t cannot be referenced from a static context
		s += t[i];
		     ^
Main.java:18: error: non-static variable t cannot be referenced from a static context
		t[i] += t[i-1];
		^
Main.java:18: error: non-static variable t cannot be referenced from a static context
		t[i] += t[i-1];
		        ^
Main.java:20: error: non-static variable t cannot be referenced from a static context
	++t[n+1];
	  ^
Main.java:20: error: non-static variable n cannot be referenced from a static context
	++t[n+1];
	    ^
Main.java:21: error: non-static variable t cannot be referenced from a static context
	t[n+1] += t[n];
	^
Main.java:21: error: non-static variable n cannot be referenced from a static context
	t[n+1] += t[n];
	  ^
Main.java:21: error: non-static variable t cannot be referenced from a static context
	t[n+1] += t[n];
	          ^
Main.java:21: error: non-static variable n cannot be referenced from a static context
	t[n+1] += t[n];
	            ^
Main.java:24: error: non-static variable n cannot be referenced from a static context
	for(int i=1; i<=n; ++i){
	                ^
Main.java:25: error: non-static variable v cannot be referenced from a static context
		v[i]=Integer.parseInt(in.next());
		^
Main.java:26: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
		          ^
Main.java:26: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
		                    ^
Main.java:26: error: non-static variable b cannot be referenced from a static context
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
		                               ^
Main.java:26: error: non-static variable v cannot be referenced from a static context
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
		                                      ^
Main.java:28: error: non-static variable s cannot be referenced from a static context
	for(int i=0; i<=s; ++i) a[i] = Math.min(i, s-i);
	                ^
Main.java:28: error: non-static variable a cannot be referenced from a static context
	for(int i=0; i<=s; ++i) a[i] = Math.min(i, s-i);
	                        ^
Main.java:28: error: non-static variable s cannot be referenced from a static context
	for(int i=0; i<=s; ++i) a[i] = Math.min(i, s-i);
	                                           ^
Main.java:31: error: non-static variable n cannot be referenced from a static context
	for(int i=1; i<=n; ++i){
	                ^
Main.java:32: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		          ^
Main.java:32: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		                     ^
Main.java:32: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		                                ^
Main.java:32: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		                                                ^
Main.java:32: error: non-static variable v cannot be referenced from a static context
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		                                                      ^
Main.java:33: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		          ^
Main.java:33: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		                             ^
Main.java:33: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		                                             ^
Main.java:33: error: non-static variable v cannot be referenced from a static context
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		                                                   ^
Main.java:33: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		                                                        ^
Main.java:34: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		          ^
Main.java:34: error: non-static variable s cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		                   ^
Main.java:34: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		                           ^
Main.java:34: error: non-static variable a cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		                                           ^
Main.java:34: error: non-static variable v cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		                                                 ^
Main.java:34: error: non-static variable t cannot be referenced from a static context
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
		                                                        ^
Main.java:38: error: non-static variable s cannot be referenced from a static context
	for(int i=1; i<s; ++i) ans += (float)a[i];
	               ^
Main.java:38: error: non-static variable ans cannot be referenced from a static context
	for(int i=1; i<s; ++i) ans += (float)a[i];
	                       ^
Main.java:38: error: non-static variable a cannot be referenced from a static context
	for(int i=1; i<s; ++i) ans += (float)a[i];
	                                     ^
Main.java:39: error: non-static variable s cannot be referenced from a static context
	for(int i=1; i+3<s; ++i){
	                 ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		   ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		           ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                     ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                             ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                       ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                                 ^
Main.java:40: error: non-static variable b cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                                           ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                                                  ^
Main.java:40: error: non-static variable b cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                                                            ^
Main.java:40: error: non-static variable a cannot be referenced from a static context
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
		                                                                                   ^
Main.java:41: error: non-static variable ans cannot be referenced from a static context
			ans += 0.25;
			^
Main.java:43: error: non-static variable ans cannot be referenced from a static context
	Sytem.out.println(ans);
	                  ^
Main.java:43: error: package Sytem does not exist
	Sytem.out.println(ans);
	     ^
56 errors