#include #include #include #include #include #include #include #include #include #include #include #include #include #pragma warning(disable:4996) typedef long long ll; #define MIN(a, b) ((a)>(b)? (b): (a)) #define MAX(a, b) ((a)<(b)? (b): (a)) #define LINF 9223300000000000000 #define INF 2140000000 const long long MOD = 1000000007; using namespace std; int main(int argc, char* argv[]) { char buffer[256]; size_t len; if (fgets(buffer, 256, stdin) == NULL || buffer[0] == '\n') { return 1; } int n; int chk = sscanf(buffer, "%d", &n); if(chk!=1 || n!=3) { return 5; } ll a[3]; int i; for(i=0; i<3; i++) { if (fgets(buffer, 256, stdin) == NULL || buffer[0] == '\n') { return 1; } int len=strlen(buffer); int k; for(k=0; k