Round #585
09 May 2026, 23:19· csharp· Meta-Llama-3.3-70B-Instruct· r13-clean-hints
- Complexity
- band 0
- ZP / UO / OBS
- 3 / 0 / 2
- Journey weight
- 250
- Lightshift ΔL
- —
Prompt
Find the median salary in each department using window functions.
Zero-point index (what the engine surfaced)
ZPI-ZPI-0019 | 2026-05-09T23:19:21Z
Find the median salary in each department using window functions.
ZERO POINT — 3 entries (structural invariants)
● hsl(7.18, 100%, 50%) class [feature]
● hsl(0.00, 100%, 50%) public [feature]
● hsl(84.10, 100%, 50%) namespace [feature]
UNOBSERVED — 0 entries (implied truths)
OBSERVED — 2 entries (explicit in request)
◉ hsl(85.13, 100%, 50%) using [feature]
◉ hsl(234.87, 100%, 50%) using [feature]
COMPLEXITY │ 5 entries │ spread: 150° │ band: LOW
Baseline response (no ZPI)
```csharp
using System;
using System.Collections.Generic;
using System.Linq;
public class Employee
{
public string Name { get; set; }
public string Department { get; set; }
public int Salary { get; set; }
}
class Program
{
static void Main()
{
var employees = new List<Employee>
{
new Employee { Name = "John", Department = "Sales", Salary = 50000 },
new Employee { Name = "Anna", Department = "Marketing", Salary = 60000 },
new Employee { Name = "Peter", Department = "Sales", Salary = 70000 },
new Employee { Name = "Linda", Department = "Marketing", Salary = 80000 },
new Employee { Name = "Tom", Department = "Sales", Salary = 60000 },
new Employee { Name = "Jerry", Department = "Marketing", Salary = 70000 },
new Employee { Name = "Bob", Department = "Sales", Salary = 80000 },
new Employee { Name = "Alice", Department = "Marketing", Salary = 90000 },
};
var medianSalaries = employees.GroupBy(e => e.Department)
.Select(g => new
{
Department = g.Key,
MedianSalary = GetMedian(g.Select(e => e.Salary).OrderBy(s => s).ToList())
});
foreach (var department in medianSalaries)
{
Console.WriteLine($"Department: {department.Department}, Median Salary: {department.MedianSalary}");
}
}
static double GetMedian(List<int> numbers)
{
var count = numbers.Count;
if (count % 2 == 0)
{
return (numbers[count / 2 - 1] + numbers[count / 2]) / 2.0;
}
else
{
return numbers[count / 2];
}
}
}
```
Enhanced response (with ZPI)
```csharp
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
public class Employee
{
public int Id { get; set; }
public string Department { get; set; }
public int Salary { get; set; }
}
class Program
{
static void Main()
{
var employees = new List<Employee>
{
new Employee { Id = 1, Department = "Sales", Salary = 50000 },
new Employee { Id = 2, Department = "Sales", Salary = 60000 },
new Employee { Id = 3, Department = "Sales", Salary = 70000 },
new Employee { Id = 4, Department = "Marketing", Salary = 40000 },
new Employee { Id = 5, Department = "Marketing", Salary = 45000 },
new Employee { Id = 6, Department = "Marketing", Salary = 55000 },
new Employee { Id = 7, Department = "IT", Salary = 60000 },
new Employee { Id = 8, Department = "IT", Salary = 65000 },
new Employee { Id = 9, Department = "IT", Salary = 70000 },
};
var medianSalaries = FindMedianSalaries(employees);
foreach (var department in medianSalaries)
{
Console.WriteLine($"Department: {department.Key}, Median Salary: {department.Value}");
}
}
static Dictionary<string, double> FindMedianSalaries(List<Employee> employees)
{
var medianSalaries = new Dictionary<string, double>();
var groupedEmployees = employees.GroupBy(e => e.Department);
foreach (var group in groupedEmployees)
{
var sortedSalaries = group.OrderBy(e => e.Salary).Select(e => e.Salary).ToList();
int count = sortedSalaries.Count;
double medianSalary;
if (count % 2 == 0)
{
medianSalary = (sortedSalaries[count / 2 - 1] + sortedSalaries[count / 2]) / 2.0;
}
else
{
medianSalary = sortedSalaries[count / 2];
}
medianSalaries.Add(group.Key, medianSalary);
}
return medianSalaries;
}
}
```
This C# code calculates the median salary for each department in a list of employees. The `FindMedianSalaries` method groups the employees by department, sorts the salaries in each group, and then calculates the median salary. If the number of salaries in a group is even, the median is the average of the two middle salaries. If the number of salaries is odd, the median is the middle salary. The median salaries are then returned as a dictionary where the keys are the department names and the values are the median salaries.
Grader chain
Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.
V1samba/Meta-Llama-3.3-70B-Instruct
BetterV4qwen2.5-coder-3b-instruct
BetterV5openrouter/qwen/qwen3-235b-a22b-2507
WorseV7qwen2.5-coder-7b-instruct
BetterV8openai/gpt-4.1
BetterV9anthropic/claude-opus-4-7
SameV12openai/gpt-4o
BetterComments
Our grader said what it said. What do you say? Comment as a guest below.
No comments yet. Be the first to say what you make of this round.