<commit_before>// https://leetcode.com/problems/minimum-absolute-difference-queries/
pub fn min_difference(nums: Vec<i32>, queries: Vec<Vec<i32>>) -> Vec<i32> {
    let mut prefix = vec![vec![0; 101]; 100001];
    for i in 0..nums.len() {
        let j = nums[i] as usize;
        prefix[i][j] += 1;
        if i > 0 {
            for j in 1..101 {
                prefix[i][j] += prefix[i - 1][j];
            }
        }
    }
    let mut answer: Vec<i32> = vec![];
    for query in queries.iter() {
        let left = query[0] as usize;
        let right = query[1] as usize;
        let mut counts = vec![0; 101];
        for i in 0..101 {
            if left == 0 {
                counts[i] = prefix[right][i];
            } else {
                counts[i] = prefix[right][i] - prefix[left - 1][i];
            }
        }
        let mut min = i32::MAX;
        let mut prev = 0;
        for i in 0..101 {
            if counts[i] == 0 {<commit_msg>Solve problem 1906<commit_after>// https://leetcode.com/problems/minimum-absolute-difference-queries/
pub fn min_difference(nums: Vec<i32>, queries: Vec<Vec<i32>>) -> Vec<i32> {
    let mut prefix = [[0; 101]; 100001];
    for (i, num) in nums.into_iter().enumerate() {
        let j = num as usize;
        prefix[i][j] += 1;
        if i > 0 {
            for j in 1..101 {
                prefix[i][j] += prefix[i - 1][j];
            }
        }
    }
    let mut answer: Vec<i32> = vec![];
    for query in queries.into_iter() {
        let left = query[0] as usize;
        let right = query[1] as usize;
        let mut counts = [0; 101];
        for i in 0..101 {
            if left == 0 {
                counts[i] = prefix[right][i];
            } else {
                counts[i] = prefix[right][i] - prefix[left - 1][i];
            }
        }
        let mut min = i32::MAX;
        let mut prev = 0;
        for i in 0..101 {
            if counts[i] == 0 {
{'fraction_non_alphanumeric': 0.15492227979274611, 'fraction_numerical': 0.04922279792746114, 'mean_word_length': 1.5045395590142672, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4423755', 'n_tokens_mistral': 723, 'n_tokens_neox': 649, 'n_words': 181}