// Croc Champ 2013 - Round 2 (Div. 2 Edition) C Weird Game
import java.io.*;
import java.math.*;
import java.util.*;
//Codeforces
public class MainCodeforces1 {
private static MyScanner in;
private static PrintStream out;
private static boolean LOCAL_TEST = false;
private static void solve() throws IOException
{
int N = in.nextInt();
char[] s = in.nextString().toCharArray();
char[] t = in.nextString().toCharArray();
int n10 = 0;
int n11 = 0;
int n01 = 0;
for (int i = 0; i < s.length; i++) {
if (s[i] == '1' && t[i] == '0')
n10++;
else if (s[i] == '1' && t[i] == '1')
n11++;
else if (s[i] == '0' && t[i] == '1')
n01++;
}
int ns = 0;
if (n11 % 2 == 1)
ns += 1;
ns += n10 - n01;
if (ns > 0)
out.println("First");
else if (ns >= -1)
out.println("Draw");
else
out.println("Second");
}
public static void main(String[] args) throws IOException {
// helpers for input/output
out = System.out;
try {
String cname = System.getenv("COMPUTERNAME");
LOCAL_TEST = (cname.equals("ALPHA530"));
} catch (Exception e) {
}
if (LOCAL_TEST) {
in = new MyScanner("E:\\zin.txt");
}
else {
boolean usingFileForIO = false;
if (usingFileForIO) {
// using input.txt and output.txt as I/O
in = new MyScanner("input.txt");
out = new PrintStream("output.txt");
}
else {
in = new MyScanner();
out = System.out;
}
}
solve();
}
// =====================================
static class MyScanner {
Scanner inp = null;
public MyScanner() throws IOException
{
inp = new Scanner(System.in);
}
public MyScanner(String inputFile) throws IOException {
inp = new Scanner(new FileInputStream(inputFile));
}
public int nextInt() throws IOException {
return inp.nextInt();
}
public long nextLong() throws IOException {
return inp.nextLong();
}
public double nextDouble() throws IOException {
return inp.nextDouble();
}
public String nextString() throws IOException {
return inp.next();
}
}
}
No comments:
Post a Comment