Muennighoff/xP3x-sample huggingface dataset:
inputs: import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws IOException{
		Scanner cin = new Scanner(System.in);
		
		int t, n, m;
		
		t = cin.nextInt();
		
		while(t > 0) {
			t--;
			int sum = 0;
			n = cin.nextInt();
			m = cin.nextInt();
			while(n > 0 && m > 0) {
				if(n < m) {
					int k = n;
					n = m;
					m = k;
				}
				sum += n / m; n %= m;
			}
			
			System.out.println(sum);
		}
	}

}

   	  			 		 	 			  				 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: constant
inputs: /* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Collections;
import java.util.HashSet;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		ArrayList<String> s1=new ArrayList<String> ();
		ArrayList<String> s2=new ArrayList<String> ();
			ArrayList<String> s3=new ArrayList<String> ();
			int i;
		for(i=0;i<n;i++)
		s1.add(sc.next());
		
		for(i=0;i<n;i++)
		s2.add(sc.next());
		s3.addAll(s2);
		for(i=0;i<n;i++)
		{
			if(s2.contains(s1.get(i)))
			s3.remove(s1.get(i));
			
			
		}
	System.out.println(s3.size());
		
	}
} Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: linear
inputs: import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class ProblemE_16 {
    
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    
    void init() throws FileNotFoundException{
        if (ONLINE_JUDGE){
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }
    
    String readString() throws IOException{
        while(!tok.hasMoreTokens()){
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }
    
    int readInt() throws IOException{
        return Integer.parseInt(readString());
    }
    
    long readLong() throws IOException{
        return Long.parseLong(readString());
    }
    
    double readDouble() throws IOException{
        return Double.parseDouble(readString());
    }
    
    public static void main(String[] args){
        new ProblemE_16().run();
    }
    
    public void run(){
        try{
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = "+(t2-t1));
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
    
    void solve() throws IOException{
        int n = readInt();
        double[][] a = new double[n][n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < n; j++){
                a[i][j] = readDouble();
            }
        }
        double[] d = new double[1<<n];
        d[(1 << n) - 1] = 1;
        for (int i = (1 << n) - 1; i > 0; i--){
            ArrayList<Integer> list = new... What is the time complexity of the previous code?
targets: np
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.*;
import java.util.*;
import java.math.*;

public class bhaa {

    InputStream is;
    PrintWriter o;
    /////////////////// CODED++ BY++ ++ ++ ++ BHAVYA++ ARORA++ ++ ++ ++ FROM++ JAYPEE++ INSTITUTE++ OF++ INFORMATION++ TECHNOLOGY++ ////////////////

///////////////////////// Make it work, make it right, make it fast. Make it work, make it right, make it fast. Make it work, make it right, make it fast. Make it work, make it right, make it fast. /////////////////

    boolean chpr(int n)
    {
    	if(n==1)
    	{
    		return true;
    	}if(n==2)
    	{
    		return true;
    	}
    	if(n==3)
    	{
    		return true;
    	}
    	if(n%2==0)
    	{
    		return false;

    	}
    	if(n%3==0)
    	{
    		return false;
    	}
    	
    	int w=2;
 		int i=5;
    	while(i*i<=n)
    	{
    		if(n%i==0)
    		{
    			return false;
    		}
    		i+=w;
    		w=6-w;
    	}
    	return true;

    }
    
    void solve() {


        int n=ni();
        int k=ni();
        int rr=2*n;
        int gr=5*n;
        int br=8*n;
        o.println((long)(Math.ceil(rr*1.0/k)+Math.ceil(gr*1.0/k)+Math.ceil(br*1.0/k)));



    	

    }





   


    












    








































    //---------- I/O Template ----------
    
    public static void main(String[] args) { new bhaa().run(); }
    void run() { 
        is = System.in; 
        o = new PrintWriter(System.out);
        solve();
        o.flush();
    }
    
    byte input[] = new byte[1024];
    int len = 0, ptr = 0;
    
    int readByte() { 
        if(ptr >= len) { ptr = 0; 
            try { len = is.read(input); } 
            catch(IOException e) { throw new InputMismatchException(); } 
            if(len <= 0) { return -1; } 
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() { 
        int b = readByte(); 
        while(b != -1 && isSpaceChar(b)) { b = readByte(); } 
        return b;
    }
    
    char nc() { return (char)skip(); }
    String ns()... Complexity:
targets: constant
inputs: import java.io.*;
import java.util.*;

public class D implements Runnable {
	public static void main(String[] args) {
		new D().run();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		boolean eof;
		String buf;

		public FastScanner(String fileName) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(fileName));
			nextToken();
		}

		public FastScanner(InputStream stream) {
			br = new BufferedReader(new InputStreamReader(stream));
			nextToken();
		}

		String nextToken() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					eof = true;
					break;
				}
			}
			String ret = buf;
			buf = eof ? "-1" : st.nextToken();
			return ret;
		}

		int nextInt() {
			return Integer.parseInt(nextToken());
		}

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}

		void close() {
			try {
				br.close();
			} catch (Exception e) {

			}
		}

		boolean isEOF() {
			return eof;
		}
	}

	FastScanner sc;
	PrintWriter out;

	public void run() {
		Locale.setDefault(Locale.US);
		try {
			sc = new FastScanner(System.in);
			out = new PrintWriter(System.out);
			solve();
			sc.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	int nextInt() {
		return sc.nextInt();
	}

	String nextToken() {
		return sc.nextToken();
	}

	long nextLong() {
		return sc.nextLong();
	}

	double nextDouble() {
		return sc.nextDouble();
	}

	void solve() {
		// long time = System.currentTimeMillis();
		int n = nextInt();
		int m = nextInt();
		boolean[][] edges = new boolean[n][n];
		boolean[] edge = new boolean[(n << 5) | n];
		for (int i = 0; i < m; i++) {
			int x = nextInt() - 1;
			int y = nextInt() - 1;
			edges[x][y] = edges[y][x] = true;
			edge[(x << 5) | y] = edge[(y << 5) | x] = true;
		}
		long[][] dp = new long[n][1 << n];
		long ans = 0;
		for (int i = 0; i < n; i++) {
			for (int... Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: np
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * Problem solution template.
 * @author Andrew Porokhin, andrew.porokhin@gmail.com
 */
public class Problem17A implements Runnable {
    void solve() throws NumberFormatException, IOException {
        
        
        
        int n = nextInt();
        int k = nextInt();

        ArrayList<Integer> primes = new ArrayList<Integer>(n + 1); 
        boolean[] simplePrime = new boolean[n + 1];
        Arrays.fill(simplePrime, 0, simplePrime.length, true);
        simplePrime[0] = simplePrime[1] = false;
        
        for (int i = 2; i <= n; i++) {
            if (simplePrime[i]) {
                for (int j = i + i; j <= n; j += i) {
                    simplePrime[j] = false;
                }
                
                primes.add(i);
            }
        }
        
        
        int actualK = 0;
        for (int i = 1; i < primes.size(); i++) {
            int val = primes.get(i - 1) + primes.get(i) + 1;
            if (val <= n) {
                if (simplePrime[val]) {
                    // System.out.printf("%d + %d + 1 = %d%n", primes.get(i - 1), primes.get(i), val);
                    actualK++;
                }
            } else {
                break;
            }
        }
        // System.out.printf("req: %d actual: %d%n", k, actualK);
        System.out.println((k <= actualK ? "YES" : "NO"));
    }

    
    StringTokenizer st;
    BufferedReader in;
    PrintWriter out;
    
    public static void main(String[] args) {
        new Problem17A().run();
    }

    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            solve();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            out.flush();
            out.close();
    ... Complexity:
targets: linear
inputs: import java.io.InputStreamReader;
import java.util.Scanner;
import java.io.IOException;

public class kresz {
	public static double a;
	public static double v;
	public static double l;
	public static double d;
	public static double w;
		
	public static double gyorsulut (double v1, double v2) { //v1 -> v2 mennyi utat tesz meg
		return Math.abs((v2*v2-v1*v1)/(2*a));
	}
	public static double gyorsulido (double v1, double v2) { //v1 -> v2 mennyi idő
		return Math.abs((v2-v1)/a);
	}
	
	
	public static void beolvas () throws IOException {
		Scanner be = new Scanner (new InputStreamReader (System.in));
			a = be.nextDouble();
			v = be.nextDouble();
			l = be.nextDouble();
			d = be.nextDouble();
			w = be.nextDouble();
		be.close();
	}
	
	
	public static void main (String args[]) throws IOException {
			beolvas();
			double s = l; //hátralévő út
			double t = 0; //eltelt idő
			
			if (v <= w ||  Math.sqrt(2*a*d) <= w) { //nincs korlátozás
				if (gyorsulut(0,v) > l) {
					t+=gyorsulido(0, Math.sqrt(2*a*l));
					s = 0;
				}
				else {
					s-=gyorsulut(0,v);
					t+=gyorsulido(0,v);
				}
			}
			else {
				
				//gyorsuló szakaszok a korlátozásig
				if (d < gyorsulut(0,v)+gyorsulut(v,w)) {
					double x = Math.sqrt(a*(d-w*w/(2*a))+w*w);
					s-=gyorsulut(0,w)+2*gyorsulut(w,x);
					t+=gyorsulido(0,w)+2*gyorsulido(w,x);
				}
				else {
					s-=gyorsulut(0,v)+gyorsulut(w,v);
					t+=gyorsulido(0,v)+gyorsulido(w,v);
				}
				
				//gyorsuló szakaszok a korlátozástól
				if (gyorsulut(v,w) > l-d) {
					double y = Math.sqrt(2*a*(l-d)+w*w);
					s-= gyorsulut(w,y);
					t+=gyorsulido(w,y);
				}
				else {
					s-=gyorsulut(w,v);
					t+=gyorsulido(w,v);
				}
			}
			
			t+=s/v; //nem gyorsuló szakaszok ideje
			
			System.out.println(t);
			
	}
	
}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: constant
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. // Don't place your source in a package
import javax.swing.*;
import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;


// Please name your class Main
public class Main {
    static FastScanner fs=new FastScanner();
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next() {
            while (!st.hasMoreElements())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        int Int() {
            return Integer.parseInt(next());
        }

        long Long() {
            return Long.parseLong(next());
        }

        String Str(){
            return next();
        }
    }


    public static void main (String[] args) throws java.lang.Exception {
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        int T=1;
        for(int t=0;t<T;t++){
            int n=Int(),m=Int();

            Solution sol=new Solution(out);
            sol.solution(n,m);
        }
        out.close();

    }


    public static int Int(){
        return fs.Int();
    }
    public static long Long(){
        return fs.Long();
    }
    public static String Str(){
        return fs.Str();
    }

}






class Solution{
    PrintWriter out;
    public Solution(PrintWriter out){
        this.out=out;
    }



    public void solution(int n,int mod){
        long res=0;
        long ncr[][]=new long[501][501];
        long pow[]=new long[501];
        pow[0]=1;
        for(int i=1;i<pow.length;i++){
            pow[i]=(pow[i-1]*2)%mod;
        }

        ncr[0][0]=1;
        for (int i=1;i<ncr.length;i++) {
            ncr[i][0]=1;
            for (int... Complexity:
targets: cubic
inputs: import java.util.Scanner;

public class HelloWorld
{
    public static void main (String args [])
    {
        Scanner read = new Scanner(System.in);
        int n = read.nextInt();
        int n1 = n; boolean q = true;
        while (n1 > 0)
        {
            if (n % n1 == 0)
            {
                if (check(n1))
                {
                    System.out.print("YES");
                    q = false;
                    break;
                }   
            }
            n1--;
        }
        if (q) System.out.print("NO");
        
    }
    public static boolean check (int n)
    {
        int n1 = n;
        while (n1 != 0)
        {
            if (n1 % 10 != 4 && n1 % 10 != 7) return false;
            n1 /= 10;
        }
        return true;
    }

}

 What is the time complexity of the previous code?
targets: constant
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. //~ 22:04:48
import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		String out = "";
		String[] p = br.readLine().split("[ ]");
		int n = Integer.valueOf(p[0]);
		double t = Double.valueOf(p[1]);
		
		int offset = 5000;
		boolean[] flags = new boolean[offset+5000];
		for(int i=0;i<n;i++){
			int[] q = toIntArray(br.readLine());
			int c = 2*q[0];
			for(int j=-q[1];j<q[1];j++){
				flags[c+offset+j] = true;
				//~ System.out.println(c+offset+j);
			}
		}
		int buf = 0;
		int last = -1;
		int index = 0;
		for(;index<flags.length;index++){
			if(flags[index]){
				if(last==-1){
					buf++;
				}else{
					//~ System.out.println(last);
					//~ System.out.println(index);
					if(Math.abs(index-last-(2*t+1))<1e-10) buf++;
					else if(index-last>2*t+1) buf+=2;
				}
				last = index;
			}
		}
		buf ++;
		out = ""+buf+"\r\n";
		bw.write(out,0,out.length());
		br.close();
		bw.close();
	}
	static int[] toIntArray(String line){
		String[] p = line.trim().split("\\s+");
		int[] out = new int[p.length];
		for(int i=0;i<out.length;i++) out[i] = Integer.valueOf(p[i]);
		return out;
	}
}
 Complexity:
targets: nlogn
inputs: import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class A {
    static int[] parent;

    public static int find(int x) {
        if (x == parent[x])
            return x;
        return parent[x] = find(parent[x]);
    }

    public static void union(int x, int y) {
        int px = find(x);
        int py = find(y);
        if (px != py) {
            parent[py] = px;
        }
    }

    public static void main(String[] args) throws Exception {
        int numCnt = (int) nextLong();
        long k = nextLong();
        parent = new int[numCnt];
        for (int i = 0; i < parent.length; i++) {
            parent[i] = i;
        }
        HashMap<Long, Integer> map = new HashMap<Long, Integer>();
        long[] ar = new long[numCnt];
        for (int i = 0; i < numCnt; i++) {
            ar[i] = nextLong();
            map.put(ar[i] * 10007 + ar[i] / 13, i);
        }
        for (int i = 0; i < ar.length; i++) {
            long req = ar[i] * k;
            Integer idx=map.get(req * 10007 + req / 13);
            if (idx!=null) {
                union(i, idx);
            }
        }
        int[] count = new int[numCnt];
        for (int i = 0; i < parent.length; i++) {
            count[find(i)]++;
        }
        int res = 0;
        for (int i = 0; i < numCnt; i++) {
            res += (int) ((count[i] + 1) / 2.0);
        }
        System.out.println(res);
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
... What is the time complexity of the previous code?
targets: nlogn
inputs: import java.util.*;
import java.io.*;
import java.math.*;
public class Solution{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringTokenizer st = new StringTokenizer(br.readLine());
        int[] a = new int[n];
        for(int i=0;i<n;i++) a[i] = Integer.parseInt(st.nextToken());
        int ind = 0;
        for(int i=0;i<n;i++){
            if(a[i]==n){
                ind = i;
                break;
            }
        }
        boolean ok = true;
        for(int i=ind+1;i<n;i++) if(a[i]>a[i-1]) ok = false;
        for(int i=ind-1;i>=0;i--) if(a[i]>a[i+1]) ok = false;
        if(ok) System.out.println("YES");
        else System.out.println("NO");
        
    }
}

 What is the time complexity of the previous code?
targets: linear
inputs: import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class LogicalExpression {
    
    int N = 256;
    
    void solve() {
        Expression[] E = new Expression[N];
        for (int i = 0; i < N; i++) E[i] = new Expression();
        
        E[Integer.parseInt("00001111", 2)].update_f("x");
        E[Integer.parseInt("00110011", 2)].update_f("y");
        E[Integer.parseInt("01010101", 2)].update_f("z");
        
        for (int l = 2; l < 40; l++) {
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < N; j++) {
                    if (E[i].e != null && E[j].t != null && E[i].e.length() + E[j].t.length() + 1 == l) {
                        E[i | j].update_e(E[i].e + '|' + E[j].t);
                    }
                    if (E[i].t != null && E[j].f != null && E[i].t.length() + E[j].f.length() + 1 == l) {
                        E[i & j].update_t(E[i].t + '&' + E[j].f);
                    }
                }
                if (E[i].f != null) E[i ^ (N - 1)].update_f('!' + E[i].f);
            }
        }
        
        String[] res = new String[N];
        for (int i = 0; i < N; i++) res[i] = E[i].calc_best();
        
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            int x = Integer.parseInt(in.nextToken(), 2);
            out.println(res[x]);
        }
    }
    
    static class Expression {
        String e, t, f;
        
        Expression() {
        }
        
        public Expression(String e, String t, String f) {
            this.e = e;
            this.t = t;
            this.f = f;
        }
        
        String calc_best() {
            String best = e;
            if (compare(best, t) > 0) best = t;
            if (compare(best, f) > 0) best = f;
            return best;
        }
        
        void update_e(String ne) {
            if (e == null || compare(e, ne) > 0) {
                e... What is the time complexity of the previous code?
targets: quadratic
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		int n=s.nextInt();
		
		int[] arr=new int[n];
		
		for(int i=0;i<n;i++)
		{
			arr[i]=s.nextInt();
		}
		
		Arrays.sort(arr);
		
		int[] visited=new int[n];
		
		int ans=0;
		
		for(int i=0;i<n;i++)
		{
			if(visited[i]==0)
			{	
				ans++;
				
				for(int j=i+1;j<n;j++)
				{
					if(arr[j]%arr[i]==0&&visited[j]==0)
					{
						visited[j]=1;
					}
				}
			}
		}
		
		System.out.println(ans);
		
	}
	
} Complexity:
targets: quadratic
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.util.Scanner;


public class main1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int a = n / 2;
		int b = n - a;
		
		if (n % 2 == 0) {
			if (a % 2 == 1) {
				a++;
				b--;
			}
			
			System.out.println(a + " " + b);
		} else {
			if (a % 2 == 1) {
				int x = a;
				a = b;
				b= x;
			}
			
			if (b % 3 == 0) {
				
			} else if (b % 3 == 1) {
				a-=2;
				b+=2;
			} else {
				a+=2;
				b-=2;
			}
			
			System.out.println(a + " " + b);
		}
	}
}
 Complexity:
targets: constant
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/*
 public class _909C {

 }

 */
public class _909C {
  int mod = (int) 1e9 + 7;

  public void solve() throws FileNotFoundException {
    InputStream inputStream = System.in;

    InputHelper in = new InputHelper(inputStream);

    // actual solution
    int n = in.readInteger();

    char[] a = new char[n];

    for (int i = 0; i < n; i++) {
      a[i] = in.read().charAt(0);
    }

    int[][][] dp = new int[2][n + 1][2];

    dp[0][0][0] = dp[0][0][1] = 1;

    for (int i = 1; i < n; i++) {
      for (int j = n; j >= 0; j--) {
        if (a[i - 1] == 's') {
          dp[1][j][0] = dp[1][j][1] = dp[0][j][1];
        } else {
          if (j > 0)
            dp[1][j][0] = dp[1][j][1] = dp[0][j - 1][0];
        }
      }

      for (int j = 0; j <= n; j++) {
        dp[0][j][0] = dp[1][j][0];
        dp[0][j][1] = dp[1][j][1];
        dp[1][j][0] = 0;
        dp[1][j][1] = 0;
      }
      for (int j = n - 1; j >= 0; j--) {
        dp[0][j][1] += dp[0][j + 1][1];
        dp[0][j][1] %= mod;
      }
    }

    System.out.println(dp[0][0][1]);
    // end here
  }

  public static void main(String[] args) throws FileNotFoundException {
    (new _909C()).solve();
  }

  class InputHelper {
    StringTokenizer tokenizer = null;
    private BufferedReader bufferedReader;

    public InputHelper(InputStream inputStream) {
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      bufferedReader = new BufferedReader(inputStreamReader, 16384);
    }

    public String read() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String line = bufferedReader.readLine();
          if (line == null) {
            return null;
          }
          tokenizer = new StringTokenizer(line);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

... Complexity:
targets: quadratic
inputs: import java.util.*;
import java.io.*;
public class B {
    public static PrintStream out = System.out;
    public static InputReader in = new InputReader(System.in);
    static class Node implements Comparable<Node> {
        int res;
        Node(int pp) {
            p = pp;
        }
        int p;
        @Override
        public int compareTo(Node n) {
            return Integer.compare(p, n.p);
        }
        @Override
        public boolean equals(Object o) {
            return p == ((Node) o).p;
        }
    }
    public static void main(String args[]) {
        int N, a, b;
        N = in.nextInt();
        int[] label;
        a = in.nextInt();
        b = in.nextInt();
        if (a < b) {
            label = new int[] {0, 1};
        } else {
            int tmp = a;
            a = b;
            b = tmp;
            label = new int[] {1, 0};
        }
        Node[] nodes = new Node[N];
        for (int i = 0; i < N; i++) {
            nodes[i] = new Node(in.nextInt());
        }
        TreeSet<Node> ts = new TreeSet<>();
        for (int i = 0; i < N; i++) {
            ts.add(nodes[i]);
        }
        while (!ts.isEmpty()) {
            Node n = ts.first();
            Node an = new Node(a - n.p);
            Node bn = new Node(b - n.p);
            SortedSet<Node> ats = ts.tailSet(an);
            SortedSet<Node> bts = ts.tailSet(bn);
            Node an2 = ats.isEmpty() ? null : ats.first();
            Node bn2 = bts.isEmpty() ? null : bts.first();
            Node n2 = null;
            int l = 0;
            if (bn2 != null && bn2.equals(bn)) {
                n2 = bn2;
                l = label[1];
            } else if (an2 != null && an2.equals(an)) {
                n2 = an2;
                l = label[0];
            } else {
                NO();
            }
            if (!n.equals(n2)) {
                ts.remove(n);
                n.res = l;
            }
            ts.remove(n2);
            n2.res = l;
        }
        out.println("YES");
        for (int i = 0; i... Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: linear
inputs: import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;


public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int n = in.nextInt();
        
        out.println(n+" 0 0");
        
        in.close();
        out.close();
        
    }

}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: constant
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;


public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        
        int n = Integer.parseInt(r.readLine());
        
        String[] line = r.readLine().split("[ ]+");
        
        int[] a = new int[n];
        for(int i = 0; i < n; i++)
            a[i] = Integer.parseInt(line[i]);
        
        
        Arrays.sort(a);
        
        boolean found = false;
        for(int i = 0; i < n && !found; i++)
            if(a[i] != 1)found = true;
        
        
        if(found){
            System.out.println(1);
            for(int i = 1; i < n; i++)
                System.out.println(a[i-1]);
        }else{
            for(int i = 0; i < n-1; i++)
                System.out.println(1);
            System.out.println(2);
        }
    }
}
 Complexity:
targets: nlogn
inputs: import java.io.*;
import java.util.*;
import java.util.Map.Entry;

public class E {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public class DSU {
		int[] sz;
		int[] p;

		public DSU(int n) {
			sz = new int[n];
			p = new int[n];
			for (int i = 0; i < p.length; i++) {
				p[i] = i;
				sz[i] = 1;
			}
		}

		public int get(int x) {
			if (x == p[x]) {
				return x;
			}
			int par = get(p[x]);
			p[x] = par;
			return par;
		}

		public boolean unite(int a, int b) {
			int pa = get(a);
			int pb = get(b);
			if (pa == pb) {
				return false;
			}
			if (sz[pa] < sz[pb]) {
				p[pa] = pb;
				sz[pb] += sz[pa];
			} else {
				p[pb] = pa;
				sz[pa] += sz[pb];
			}
			return true;
		}
	}

	public class SegmentTreeAdd {
		int pow;
		long[] min;
		long[] delta;
		boolean[] flag;

		public SegmentTreeAdd(long[] a) {
			pow = 1;
			while (pow < a.length) {
				pow *= 2;
			}
			flag = new boolean[2 * pow];
			min = new long[2 * pow];
			delta = new long[2 * pow];
			for (int i = 0; i < min.length; i++) {
				min[i] = Long.MAX_VALUE / 2;
			}
			for (int i = 0; i < a.length; i++) {
				min[pow + i] = a[i];
			}
			for (int i = pow - 1; i > 0; i--) {
				min[i] = f(min[2 * i], min[2 * i + 1]);
			}
		}

		public long get(int l, int r) {
			return get(1, 0, pow, l, r);
		}

		private long get(int v, int tl, int tr, int l, int r) {
			push(v, tl, tr);
			if (l >= tr || r <= tl) {
				return Long.MAX_VALUE / 2;
			}
			if (l <= tl && r >= tr) {
				return min[v];
			}
			int tm = (tl + tr) / 2;
			return f(get(2 * v, tl, tm, l, r), get(2 * v + 1, tm, tr, l, r));
		}

		public void set(int l, int r, long x) {
			set(1, 0, pow, l, r, x);
		}

		private void set(int v, int tl, int tr, int l, int r, long x) {
			push(v, tl, tr);
			if (l >= tr || r <= tl) {
				return;
			}
			if (l <= tl && r >= tr) {
				delta[v] += x;
				flag[v] = true;
				push(v, tl, tr);
				return;
			}
			int tm = (tl + tr) / 2;
			set(2 * v, tl, tm, l, r, x);
			set(2 * v + 1, tm, tr, l, r, x);
			min[v] = f(min[2 * v], min[2... What is the time complexity of the previous code?
targets: cubic
inputs: import java.io.*;
import java.util.*;
public class Main
{
	public static void main(String[] args) throws Exception
	{
	    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	    int n=Integer.parseInt(br.readLine());
	    String s=br.readLine();
	    String ss[]=s.split(" ");
	    int arr[]=new int[n];
	    for(int i=0;i<n;i++)
	    arr[i]=Integer.parseInt(ss[i]);
	    Arrays.sort(arr);
	    int coun=0,coun2=0;
	    for(int i=arr[0],k=0;k<n;)
	    {
	        for(int j=k;j<n;j++)
	        {
	            if(arr[j]%i==0)
	            {
	                arr[j]=-1;
	                coun2++;
	            }
	        }
	        Arrays.sort(arr);
	        k=coun2;
	        coun++;
	        if(coun2<n)
	        i=arr[coun2];
	        else
	        break;
	        
	    }
		System.out.println(coun);
	}
}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: quadratic
inputs: import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class A1 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long size = scan.nextLong();
        int numberOfSpecial = scan.nextInt();
        long pageSize = scan.nextLong();

        long[] specialItemsArray = new long[numberOfSpecial];
        for (int i = 0; i < numberOfSpecial; i++) {
            specialItemsArray[i] = scan.nextLong();
        }

        int totalRemoved = 0;
        int step = 0;

        long currentPageIndex = BigDecimal.valueOf(specialItemsArray[0]).divide(BigDecimal.valueOf(pageSize),2, RoundingMode.UP).setScale(0, RoundingMode.CEILING).longValue();
        int specialItemArrayIndex = 1;

        while (specialItemArrayIndex < numberOfSpecial) {
            long pageIndex = BigDecimal.valueOf(specialItemsArray[specialItemArrayIndex] - totalRemoved).divide(BigDecimal.valueOf(pageSize),2,RoundingMode.UP).setScale(0, RoundingMode.CEILING).longValue();
            if (currentPageIndex != pageIndex) {
                step++;
                totalRemoved = specialItemArrayIndex;
                currentPageIndex =  BigDecimal.valueOf(specialItemsArray[specialItemArrayIndex] - totalRemoved).divide(BigDecimal.valueOf(pageSize),2,RoundingMode.UP).setScale(0, RoundingMode.CEILING).longValue();
            }
            specialItemArrayIndex++;
        }


        System.out.println(step + 1);

    }

}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: linear
inputs: import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (n % 2 == 0) {
            System.out.println((n - 4) + " " + (n - (n - 4)));
        } else {
            System.out.println((n - 9) + " " + (n - (n - 9)));
        }
    }

}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: constant
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	void run() {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = in.nextInt(), k = in.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; ++i)
			a[i] = in.nextInt();
		Arrays.sort(a);
		int ret = 0, it = 0;
		for (int i = 0; i < n; ++i) {
			int val = a[i] % k == 0 ? a[i] / k : -1;
			while (it < i && a[it] < val) ++it;
			if (it == i || a[it] != val) {
				++ret;
			}
			else {
				a[i] = 0;
			}
		}
		out.println(ret);

		out.close();
	}
}

class InputReader {
	BufferedReader buff;
	StringTokenizer tokenizer;

	InputReader(InputStream stream) {
		buff = new BufferedReader(new InputStreamReader(stream));
		tokenizer = null;
	}
	boolean hasNext() {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			try {
				tokenizer = new StringTokenizer(buff.readLine());
			}
			catch (Exception e) {
				return false;
			}
		return true;
	}
	String next() {
		if (!hasNext())
			throw new RuntimeException();
		return tokenizer.nextToken();
	}
	int nextInt() { return Integer.parseInt(next()); }
	long nextLong() { return Long.parseLong(next()); }
}

 Complexity:
targets: nlogn
inputs: Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicReferenceArray;

public class NastyaWardrobe {
    static long modulo = 1000000007;
    static long ans = 0;
    public static void main(String[] args) throws IOException {

        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String[] s1 = inp.readLine().split(" ");
        long clothes = Long.parseLong(s1[0]);
        long months = Long.parseLong(s1[1]);

        //formula 2^k(2x-1)+1;
        calc(clothes,months);
        System.out.print(ans);
    }
    static void calc(long clothes,long months){
        if(clothes!=0) {
            long a;
            long count = 0;
            ArrayList<Long> list = new ArrayList<>();
            if (months >= 2) {
                a = 2;
                long c = months;

                while (c > 1) {
                    if (c % 2 == 1) {
                        count++;
                        list.add(a);
                    }
                    c = c / 2;

                    a = (a * a) % modulo;
                }
                while (count > 0) {
                    long b = list.get(0);
                    list.remove(0);
                    a = (a * b) % modulo;
                    count--;
                }

            } else {
                a = (long) Math.pow(2, months);
            }


            long b = clothes;

            //System.out.println(b);
            b = (2 * b - 1) % modulo;
            ans = (a * b) % modulo;
            ans = (ans + 1) % modulo;
        }else{
            ans = 0;
        }

    }
}
 Complexity:
targets: logn
inputs: import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author MaxHeap
 */
public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    CBanhMi solver = new CBanhMi();
    solver.solve(1, in, out);
    out.close();
  }

  static class CBanhMi {

    long mod = (long) (1e9 + 7);

    public void solve(int testNumber, InputReader in, PrintWriter out) {
      int n = in.nextInt();
      int q = in.nextInt();
      long[] two = new long[n + 1];
      two[0] = 1;
      for (int i = 1; i <= n; ++i) {
        two[i] = (two[i - 1] * 2L);
        two[i] %= mod;
      }

      char[] s = in.nextCharArray();
      int[] acc = new int[n + 1];
      for (int i = 1; i <= n; ++i) {
        acc[i] = s[i - 1] == '0' ? 0 : 1;
        acc[i] += acc[i - 1];
      }
      // 0 0 1 1 | 1: 1 1 2| 2: 2 3| 4: 5| 9
      // 0 1 1 1| 1: 1 2 2| 2: 3 3| 5: 6| 11
      // 0 1 1 wwqwq| 1: 1 2 2| 3: 5 3| 8: 8| 16
      // 0 0 1 1| 1: 1 1 2| 3: 3 3| 6: 6| 12
      // 0 0 0 1| 1: 1 1 1| 2: 2 2| 4: 4| 8
      while (q-- > 0) {
        int f = in.nextInt();
        int t = in.nextInt();
        int ones = acc[t] - acc[f - 1];
        int zeros = (t - f + 1) - ones;
        if (ones == 0) {
          out.println(0);
        } else {
          long ans = two[t - f + 1] - (zeros > 0 ? two[zeros] : 0);
          if (zeros == 0) {
            --ans;
          }
          ans = (ans + mod) % mod;
          out.println(ans);
        }
      }
    }

  }

  static class InputReader implements FastIO {

    private InputStream stream;
    private static final int DEFAULT_BUFFER_SIZE = 1 << 16;
    private static final int EOF = -1;
   ... What is the time complexity of the previous code?
targets: linear
inputs: import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.Comparator;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskA {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int count = in.readInt();
        int[] array = IOUtils.readIntArray(in, count);
        int[] sorted = array.clone();
        ArrayUtils.sort(sorted, IntComparator.DEFAULT);
        int differs = 0;
        for (int i = 0; i < count; i++) {
            if (array[i] != sorted[i])
                differs++;
        }
        if (differs <= 2)
            out.printLine("YES");
        else
            out.printLine("NO");
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

   ... Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: nlogn
inputs: import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class C {

	static StringBuilder st = new StringBuilder();

		public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		Point [] square = new Point [4] ; 
		Point [] rotSquare = new Point[4] ; 
		
		for(int i = 0 ; i < 4 ;i++)
			square[i] = new Point(sc.nextInt() , sc.nextInt());
		
		for(int i = 0 ; i < 4 ;i++)
			rotSquare[i] = new Point(sc.nextInt() , sc.nextInt());
		
		boolean can = false ; 
		
		for(int x = -100 ; x <= 100 ; x++)
			for(int y = -100 ; y <= 100 ; y++)
				can |= inside(new Point(x , y), square) & inside(new Point (x , y), rotSquare);
				
			
		
		
		out.println(can ? "YES" : "NO");
		
		out.flush();
		out.close();

	}
	static int crossProduct(Point a , Point b)
	{
		int ans = a.x * b.y - a.y * b.x ; 
		
		if(ans < 0)return -1 ;
		if(ans == 0) return 0 ;
		return 1 ; 
	}
	
	static boolean inside(Point a , Point [] points)
	{
		boolean allPos = true ; 
		boolean allNeg = true ; 
		
		for(int i = 0 ; i < 4 ; i++)
		{
			Point v1 = new Point (points[i].x - a.x , points[i].y - a.y) ; 
			Point v2 = new Point (points[(i + 1) % 4].x - a.x , points[(i + 1) % 4].y - a.y) ; 
			
			allPos &= crossProduct(v1, v2) >= 0;
			allNeg &= crossProduct(v1, v2) <= 0;
		}
		return allPos | allNeg ; 
		
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() throws Exception {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());

			return st.nextToken();
		}

		int nextInt() throws Exception {
			return Integer.parseInt(next());
		}

		long nextLong() throws Exception {
			return Long.parseLong(next());
		}

		double nextDouble() throws Exception {
			return Double.parseDouble(next());
		}

	}

	static void shuffle(int[] a) {
		int n = a.length;
		for (int i =... Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: constant
inputs: import java.io.*;
import java.util.*;

public class Main {

	static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e){e.printStackTrace();}
        }

        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {st = new StringTokenizer(br.readLine());}
            catch (Exception e) {e.printStackTrace();}
            return st.nextToken();
        }

        public int nextInt() {return Integer.parseInt(next());}

        public long nextLong() {return Long.parseLong(next());}

        public double nextDouble() {return Double.parseDouble(next());}

        public String nextLine() {
            String line = "";
            if(st.hasMoreTokens()) line = st.nextToken();
            else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
            while(st.hasMoreTokens()) line += " "+st.nextToken();
            return line;
        }
    }
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter pw = new PrintWriter(System.out);

        int n = sc.nextInt();
        int best = 1;
        int bestTime = Integer.MAX_VALUE;
        for(int i=0;i<n;i++) {
            int time;
            int a = sc.nextInt();
            time = (a%n==0 || a%n<=i) ? a/n : (a+n)/n;
            if(time < bestTime) {
                best = i + 1;
                bestTime = time;
            }
        }

        pw.println(best);
        pw.close();
    }
}
 Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?
targets: linear
inputs: import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;

public class Main {
	
	public static void main(String args[]) {
		new Main().run();
	}
	
	void run(){
		Locale.setDefault(Locale.US);
		try(Scanner in=new Scanner(System.in);
			PrintWriter out=new PrintWriter(System.out)){
			solve(in, out);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}

	private void solve(Scanner in, PrintWriter out) {
		String a=in.nextLine();
		out.println("25");
	}
	
}
 What is the time complexity of the previous code?
targets: constant
inputs: import java.io.*;
import java.util.*;
import java.math.*;

public class A {
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer st;
    static Random rnd;

    void solve() throws IOException {
        int n = nextInt();

        int[] arr = new int[n];
        Integer[] arrCopy = new Integer[n];

        for (int i = 0; i < n; i++)
            arr[i] = arrCopy[i] = nextInt();

        Arrays.sort(arrCopy);

        int bad = 0;

        for (int i = 0; i < n; i++)
            if (arr[i] != arrCopy[i])
                ++bad;

        boolean fail = bad > 2;

        out.println(!fail ? "YES" : "NO");
    }

    public static void main(String[] args) {
        new A().run();
    }

    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);

            rnd = new Random();

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(42);
        }
    }

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();

            if (line == null)
                return null;

            st = new StringTokenizer(line);
        }

        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
} What is the time complexity of the previous code?
targets: nlogn